Skip to content

Conversation

@billyvg
Copy link
Member

@billyvg billyvg commented Jul 29, 2025

Blocked images do not have the correct dimensions if we snapshot before the image finishes loading. This attaches an event listener to the image and creates a mutation event to set the correct width/height of the image placeholder element after the image is loaded.

Blocked images do not have the correct dimensions if we snapshot before the image finishes loading. This attaches an event listener to the image and creates a mutation event to set the correct width/height of the image placeholder element after the image is loaded.
@linear
Copy link

linear bot commented Jul 29, 2025

Comment on lines -1301 to -1302
// this property was not needed in replay side
delete serializedNode.needBlock;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved this further down the function so that we can make use of needBlock before deleting.

@billyvg billyvg marked this pull request as ready for review July 29, 2025 22:01
@billyvg billyvg requested a review from a team July 29, 2025 22:02
Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Co-authored-by: Charly Gomez <charly.gomez@sentry.io>
@billyvg billyvg merged commit fb82018 into sentry-v2 Aug 1, 2025
16 checks passed
@billyvg billyvg deleted the billy/replay-565-blocked-image-not-recorded-with-correct-dimensions branch August 1, 2025 14: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.

3 participants