Skip to content

[gatsby-image] Transparent PNGs always fade-in #10937

@tylerhunt

Description

@tylerhunt

Description

When using a PNG with a transparent background, there's a blurred fade-in effect even with fadeIn set to false.

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).

untitled

Environment

  System:
    OS: macOS Sierra 10.12.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 8.10.0 - ~/.nvm/versions/node/v8.10.0/bin/node
    Yarn: 1.12.1 - /usr/local/bin/yarn
    npm: 5.6.0 - ~/.nvm/versions/node/v8.10.0/bin/npm
  Browsers:
    Chrome: 71.0.3578.98
    Safari: 12.0.2
  npmPackages:
    gatsby: ^2.0.76 => 2.0.76 
    gatsby-image: ^2.0.20 => 2.0.25 
    gatsby-plugin-manifest: ^2.0.9 => 2.0.12 
    gatsby-plugin-offline: ^2.0.16 => 2.0.20 
    gatsby-plugin-react-helmet: ^3.0.2 => 3.0.5 
    gatsby-plugin-sharp: ^2.0.14 => 2.0.16 
    gatsby-source-filesystem: ^2.0.8 => 2.0.12 
    gatsby-transformer-sharp: ^2.1.8 => 2.1.9 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions