-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Image srcSet flashes then switches back to src image #19041
Milestone
Comments
Timer
added
kind: bug
and removed
bug
Issue was opened via the bug report template.
labels
Nov 11, 2020
Timer
added a commit
to Timer/next.js
that referenced
this issue
Dec 31, 2020
This PR fixes a bug where we'd accidentally pass-through the user-provided `srcSet` if the image was lazy, just to then replace it when we hydrate. --- Fixes vercel#19041
kodiakhq bot
pushed a commit
that referenced
this issue
Dec 31, 2020
This PR fixes a bug where we'd accidentally pass-through the user-provided `srcSet` if the image was lazy, just to then replace it when we hydrate. --- Fixes #19041
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug report
Describe the bug
I use srcSet to display 2 different images: one on desktop and a different one mobile. My hero image needs to take full width of the container so I use
layout="fill"
. The bug I encounter is that on mobile the image flashes to the srcSet specified on that size then flash back to the desktop image.To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
I've written an example on codesandbox to explain what I am talking about:
moving-truck-mobile.jpg
flashes then switches tomoving-truck.jpg
Expected behavior
The expected behaviour should display the
moving-truck-mobile.jpg
on mobile, knowing that it works for me when I use the htmlimg
System information
The text was updated successfully, but these errors were encountered: