Skip to content
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.

Getting [ The "critical" prop is now deprecated ] #19

Open
KentaroKoga opened this issue Oct 17, 2019 · 6 comments
Open

Getting [ The "critical" prop is now deprecated ] #19

KentaroKoga opened this issue Oct 17, 2019 · 6 comments
Labels
good first issue Good for newcomers

Comments

@KentaroKoga
Copy link

I'm getting this message when I run "gatsby develop".

The "critical" prop is now deprecated and will be removed in the next major version
    of "gatsby-image".
Please use the native "loading" attribute instead of "critical".

seems like there's updates on "gatsby-image" so this plugin also needs to be updated a little bit.

btw, this plugin is just awesome:)
Massive thanks to everyone who is contributing!

@TylerBarnes
Copy link
Owner

Good point @KentaroKoga !
So far I've mostly been the one maintaining this. If you're interested in helping this would be a great first issue!

@TylerBarnes TylerBarnes added the good first issue Good for newcomers label Oct 24, 2019
@TylerBarnes
Copy link
Owner

I believe this is where it needs to be updated.

@KentaroKoga
Copy link
Author

KentaroKoga commented Nov 2, 2019

According to gatsby-image, "critical" property is deprecated. so I changed it with loading: "lazy" like the official document says but it stops working...
loading: "auto" is not working either but loading: "eager" is working somehow.

When I set loading: "lazy" or loading: "auto", there is no picture and source tags created but only blurred img is created.

@TylerBarnes
Copy link
Owner

@KentaroKoga the unveiling of the hi-res image is imitated in https://github.com/TylerBarnes/gatsby-wordpress-inline-images/blob/c7d82a38ccd044d16f9ae61bd1468ba20e29ce92/src/gatsby-browser.js , so that file may need to be updated as well for this to work properly

@8ctopotamus
Copy link
Contributor

Can this be updated, please? I keep having to go into node_modules to manually change it. A PR has already been submitted. Thanks!

@TylerBarnes
Copy link
Owner

The PR has been merged and published under [email protected], please try it out and let me know if it's working for you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants