TylerBarnes / gatsby-wordpress-inline-images

Fluid images for gatsby-source-wordpress inline images in post_content
57 stars 25 forks source link

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

Open KentaroKoga opened 4 years ago

KentaroKoga commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

I believe this is where it needs to be updated.

KentaroKoga commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

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 commented 4 years ago

The PR has been merged and published under gatsby-wordpress-inline-images@1.1.0, please try it out and let me know if it's working for you!