-
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-image] Transparent PNGs always fade-in #10937
Comments
Thank you for opening this @tylerhunt From the documentation at https://www.gatsbyjs.org/packages/gatsby-image/
Can you try removing Base64 from your query and confirm if this happens? |
@sidharthachatterjee Thanks for the quick response. The |
I know this is closed.. but is the conclusion here simply to avoid using transparent PNGs with blur-up? Is the blurring up approach incompatible with transparency? My solution was to re-save my PNGs without transparency as I'm a fan of the blur-up approach. |
@richhiggins you won't be able to avoid some overlap due to transparency if you embed base64 as a placeholder graphic until the full version is available. I've submitted a PR about a week ago that does fix this to a degree though. It's mostly focused on skipping any CSS transition when the full image is in the browser cache, but you'll have momentarily flicker of the placeholder when it's embedded until the JS kicks in and updates the DOM. I also removed the base64 fade out transition(doesn't really have much purpose), |
Description
When using a PNG with a transparent background, there's a blurred fade-in effect even with
fadeIn
set tofalse
.Steps to reproduce
Add a PNG with an alpha channel to the page using
<Img fadeIn={false} />
.Expected result
There should be no fading when the page loads or when navigating between pages.
Actual result
A blurred version of the image is visible for a short period of time and then fades out.
Here's an example with a version of the
gatsby-astronaut.png
image that's had the background made transparent. This shows what the fade looks like when the page is initialized (just navigating between cached pages here).Environment
The text was updated successfully, but these errors were encountered: