diff --git a/packages/rrweb-snapshot/src/snapshot.ts b/packages/rrweb-snapshot/src/snapshot.ts index e38f3f623b..355dce87d3 100644 --- a/packages/rrweb-snapshot/src/snapshot.ts +++ b/packages/rrweb-snapshot/src/snapshot.ts @@ -1119,8 +1119,18 @@ export function serializeNodeWithId( let { needsMask } = options; let { preserveWhiteSpace = true } = options; - if (inlineImages) { - captureAssets.images = true; + if (onAssetDetected) { + if (captureAssets.images === undefined && inlineImages) { + captureAssets.images = true; + } + if (captureAssets.stylesheets === undefined) { + if (inlineStylesheet) { + // the prior default setting + captureAssets.stylesheets = 'without-fetch'; + } else { + captureAssets.stylesheets = false; + } + } } if (!needsMask) {