Skip to content

fix: Patch inline image breaking images when server does not support CORS#13

Draft
ptang-nr wants to merge 3 commits intomasterfrom
NR-519763-patch-inline-image
Draft

fix: Patch inline image breaking images when server does not support CORS#13
ptang-nr wants to merge 3 commits intomasterfrom
NR-519763-patch-inline-image

Conversation

@ptang-nr
Copy link
Copy Markdown

@ptang-nr ptang-nr commented Apr 28, 2026

There was an issue where rrweb would retry inlining images by setting the crossorigin='anonymous' attribute on the image. This causes the browser to refetch the image, and if the server does not support CORS, it'll cause the image to not render because CORS error will not trigger the cleanup/restore logic.

In this PR, we are basing our solution on this proposed fix: valenfv-felix@11debf2. It ensures we adhere to using the canvas to generate the image data url, with tie-ins to rrweb's dataURLOptions setting to control the quality of the image.

https://new-relic.atlassian.net/browse/NR-519763

@github-actions
Copy link
Copy Markdown

📦 Changeset Status

yarn run v1.22.22
$ /home/runner/work/rrweb/rrweb/node_modules/.bin/changeset status --verbose --since origin/master
🦋  info Packages to be bumped at patch
🦋
🦋    ┌─────────────┬─────────────┬───────────────────────────────────────────────┐
🦋    │   Package   │ New Version │          Related Changeset Summaries          │
🦋    │    Name     │             │                                               │
🦋    ├─────────────┼─────────────┼───────────────────────────────────────────────┤
🦋    │ @newrelic/rr│ 1.1.1       │ .changeset/tasty-shoes-laugh.md               │
🦋    │ web-snapshot│             │                                               │
🦋    ├─────────────┼─────────────┼───────────────────────────────────────────────┤
🦋    │ @newrelic/rr│ 1.1.1       │                                               │
🦋    │ web         │             │                                               │
🦋    ├─────────────┼─────────────┼───────────────────────────────────────────────┤
🦋    │ @newrelic/rr│ 1.1.1       │                                               │
🦋    │ dom         │             │                                               │
🦋    ├─────────────┼─────────────┼───────────────────────────────────────────────┤
🦋    │ @newrelic/rr│ 1.1.1       │                                               │
🦋    │ web-player  │             │                                               │
🦋    ├─────────────┼─────────────┼───────────────────────────────────────────────┤
🦋    │ @newrelic/rr│ 1.1.1       │                                               │
🦋    │ web-all     │             │                                               │
🦋    ├─────────────┼─────────────┼───────────────────────────────────────────────┤
🦋    │ @newrelic/rr│ 1.1.1       │                                               │
🦋    │ web-replay  │             │                                               │
🦋    ├─────────────┼─────────────┼───────────────────────────────────────────────┤
🦋    │ @newrelic/rr│ 1.1.1       │                                               │
🦋    │ web-record  │             │                                               │
🦋    ├─────────────┼─────────────┼───────────────────────────────────────────────┤
🦋    │ @newrelic/rr│ 1.1.1       │                                               │
🦋    │ web-types   │             │                                               │
🦋    ├─────────────┼─────────────┼───────────────────────────────────────────────┤
🦋    │ @newrelic/rr│ 1.1.1       │                                               │
🦋    │ web-packer  │             │                                               │
🦋    ├─────────────┼─────────────┼───────────────────────────────────────────────┤
🦋    │ @newrelic/rr│ 1.1.1       │                                               │
🦋    │ web-utils   │             │                                               │
🦋    ├─────────────┼─────────────┼───────────────────────────────────────────────┤
🦋    │ @newrelic/rr│ 1.1.1       │                                               │
🦋    │ video       │             │                                               │
🦋    └─────────────┴─────────────┴───────────────────────────────────────────────┘
🦋
🦋  ---
🦋  info Running release would release NO packages as a minor
🦋  ---
🦋  info Running release would release NO packages as a major
Done in 0.50s.

@ptang-nr ptang-nr marked this pull request as ready for review April 28, 2026 02:10
@ptang-nr ptang-nr marked this pull request as draft April 28, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant