Skip to content

Conversation

sebmarkbage
Copy link
Collaborator

@sebmarkbage sebmarkbage commented Aug 12, 2025

Same as #34166 but for Suspensey images.

The trick here is to check the SuspenseyImagesMode since not all versions of React and not all subtrees will have Suspensey images enabled yet.

The other trick is to read back from currentSrc to get the image url we actually resolved to in this case. Similar to how for Suspensey CSS we check if the media query would've matched.

Screenshot 2025-08-11 at 9 32 56 PM

@sebmarkbage sebmarkbage requested a review from eps1lon August 12, 2025 01:37
@meta-cla meta-cla bot added the CLA Signed label Aug 12, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Aug 12, 2025
@react-sizebot
Copy link

react-sizebot commented Aug 12, 2025

Comparing: 14c50e3...4a69e15

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 530.18 kB 530.18 kB = 93.39 kB 93.39 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 654.55 kB 654.55 kB = 115.11 kB 115.11 kB
facebook-www/ReactDOM-prod.classic.js = 674.32 kB 674.32 kB = 118.29 kB 118.29 kB
facebook-www/ReactDOM-prod.modern.js = 664.74 kB 664.74 kB = 116.65 kB 116.65 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 4a69e15

@sebmarkbage sebmarkbage force-pushed the devtoolssuspenseyimages branch from 22cbd4c to 4a69e15 Compare August 13, 2025 03:34
@sebmarkbage sebmarkbage merged commit db06f6b into facebook:main Aug 13, 2025
241 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants