Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: responsive images not supported in link preload headers #32437

Closed
gnoff opened this issue Feb 20, 2025 · 0 comments · Fixed by #32445
Closed

Bug: responsive images not supported in link preload headers #32437

gnoff opened this issue Feb 20, 2025 · 0 comments · Fixed by #32445
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@gnoff
Copy link
Collaborator

gnoff commented Feb 20, 2025

Browsers does not yet support preloading responsive images from link headers. Currently React can produce link headers for resource preloading and in particular can do so for images. However if an image uses srcset or sizes it's preload won't correctly load the right variant if preloaded using a link header so we should exclude these image preloads from the headers mechanism.

@gnoff gnoff added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Feb 20, 2025
@gnoff gnoff closed this as completed in 9b042f9 Feb 21, 2025
github-actions bot pushed a commit that referenced this issue Feb 21, 2025
…32445)

Link headers are optionally supported for cases where you prefer to send
resource loading hints before you're ready to send the body of a
request. While many resources can be correctly preloaded from a link
header responsive images are currently not supported and end up
preloading the default src rather than the correctly sized image. Until
responsive images are supported React will not allow these images to
preload as headers and will retain them to preload as HTML.

closes: #32437

DiffTrain build for [9b042f9](9b042f9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant