-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[gatsby-plugin-image] art directed images flicker when parent component rerenders #34009
Comments
@ardiewen thanks for raising. We are also experiencing this issue. |
I am not sure what you mean by 'Art directed' images but we have the same issue I think. We are migrating to gatsby-plugin-images and we have a flicker issue on images. Its a load blocker for migration.. You can see the screen recording below from our test branch. Screen.Recording.2021-12-21.at.14.07.58.mov. |
Is this fix confirmed? I’m using gatsby-plugin-image v2.15.0 and still experiencing flickering when using |
For the fix, we changed the way we loaded the images in our code and later they were removed from our hero so I am not sure if the problem still persists or not. |
OK, thanks for the feedback @dgozen. |
Preliminary Checks
Description
When a parent component containing an art directed image re-renders, the art directed image "flickers" even after it has been loaded. This behaviour does not occur with a non-art directed
GatsbyImage
component.This behaviour exists in both development and built environments.
Reproduction Link
https://github.com/ardiewen/gatsby-image-withartdirection-repro
Steps to Reproduce
gatsby-plugin-image
gatsby-plugin-sharp
gatsby-transformer-sharp
gatsby-source-filesystem
or clone this minimal reproductionyarn && yarn develop
to test in development environments with no flagsyarn build && yarn start
to test in the built environment...
Expected Result
Art directed images shouldn't "flicker" after they've been loaded, unless the viewport / media query is changing.
Actual Result
It appears that the GatsbyImage component itself isn't re-rendering, but the picture element is constantly being unmounted / remounted when the parent component is rerendered.
Environment
Config Flags
N/A
The text was updated successfully, but these errors were encountered: