Skip to content
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

Native loading="lazy" lacks dimensions inside gatsby-image. #17506

Closed
eriktiekstra opened this issue Sep 9, 2019 · 26 comments
Closed

Native loading="lazy" lacks dimensions inside gatsby-image. #17506

eriktiekstra opened this issue Sep 9, 2019 · 26 comments
Labels
topic: media Related to gatsby-plugin-image, or general image/media processing topics type: upstream Issues outside of Gatsby's control, caused by dependencies

Comments

@eriktiekstra
Copy link

eriktiekstra commented Sep 9, 2019

Description

I am using the fluid queries within gatsby-image. When using the default loading="lazy", I get the following warning inside the console:

Screenshot 2019-09-09 at 15 44 21

[Intervention] An <img> element was lazyloaded with loading=lazy, but had no dimensions specified. Specifying dimensions improves performance. See https://crbug.com/954323

I tried to search for this issue, but only found 2 unanswered questions on spectrum. I am using gatsby 2.15.11 and gatsby-image 2.2.17. As far as I can see the native lazy-loading has been introduced in gatsby-image 2.1.0.

It also appears on https://using-gatsby-image.gatsbyjs.org/

@lannonbr lannonbr added the topic: media Related to gatsby-plugin-image, or general image/media processing topics label Sep 9, 2019
@ascorbic
Copy link
Contributor

I think the problem here is that fluid images by their nature can't have their size set in the HTML, because they're supposed to resize to fit their container. I'm not sure if there's a way around this (or if it's actually a problem).

@wardpeet
Copy link
Contributor

I've created an upstream issue on chromium https://bugs.chromium.org/p/chromium/issues/detail?id=1002455. Seems like chrome doens't detect fluid containers and mark images without dimensions as faulty. You shouldn't worry about it.

@wardpeet wardpeet added the type: upstream Issues outside of Gatsby's control, caused by dependencies label Sep 10, 2019
@eriktiekstra
Copy link
Author

@ascorbic
It is a warning, so nothing breaks the site. I just like to keep my console clean, so I thought to make people aware of it.

@wardpeet Thanks for creating an issue on chromium, I actually didn't think of that it could be an issue in the browser. It makes sense though.

@gatsbot
Copy link

gatsbot bot commented Oct 1, 2019

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@gatsbot gatsbot bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Oct 1, 2019
@gatsbot
Copy link

gatsbot bot commented Oct 12, 2019

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.

Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community!

@gatsbot gatsbot bot closed this as completed Oct 12, 2019
@jimmyandrade
Copy link

👀

@olee
Copy link

olee commented Mar 7, 2020

This issue is still relevant and should be reopened I think

@CanRau CanRau added not stale and removed stale? Issue that may be closed soon due to the original author not responding any more. labels Mar 9, 2020
@CanRau CanRau reopened this Mar 9, 2020
@michaelCaleyWhaley
Copy link

Still an issue. Even with it being fluid we should be able to pass in attributes

@hlolli
Copy link

hlolli commented Mar 18, 2020

This causes chrome not to lazy load at all, and the lighthouse/audit rankings are down the drain because of this.

@fabiomrbarbosa
Copy link

I'd also like to see this being addressed. Adding attributes to images, even when fluid, is slowly becoming a new best practice.

@AntoineBourin
Copy link

We can’t use fluid images for now. I’m using only fixed images without the possibility to set attributes on fluid images...

@christophcar
Copy link

I am facing this issue as well, would be great if this could be adressed any time soon.

@benyou1969
Copy link

Still facing this issue

@forwinder15
Copy link

Still a thing

@Z11
Copy link

Z11 commented Apr 21, 2020

Still an issue 😿

@renguer0
Copy link

Still an issue here too (blazy in css backgrounds).

@TovlyDeutsch
Copy link

Looks like the removal of this console warning was just merged into Chromium: https://chromium-review.googlesource.com/c/chromium/src/+/2159142. Not sure when it will appear in Chrome, perhaps after the next major release (mid-May I believe)?

@waynehaffenden
Copy link

As of 1st June using the latest release build of Chrome (Version 83.0.4103.61) this is still an issue.

@gokaiorg
Copy link

gokaiorg commented Jun 3, 2020

Still no changes about this issue.

@Z11
Copy link

Z11 commented Jun 16, 2020

checking back, still seeing this issue.

@RubenNijhuis
Copy link

Still an issue

@suraneti
Copy link

Still an issue

Chrome: version 83.0.4103.116 (Official Build) (64-bit)

@victornnaji
Copy link

Still an Issue as of today!

@E-PL
Copy link

E-PL commented Jul 20, 2020

I've just updated Chrome to Version 84.0.4147.89 (Official Build) (64 bit) and I'm not getting the console warning anymore, I suppose that the removal of the warning message was merged into Chrome stable 🎉

@mxstbr
Copy link
Contributor

mxstbr commented Dec 9, 2020

Closing as this was a Chrome issue that has apparently been resolved as per @E-PL!

@mxstbr mxstbr closed this as completed Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: media Related to gatsby-plugin-image, or general image/media processing topics type: upstream Issues outside of Gatsby's control, caused by dependencies
Projects
None yet
Development

No branches or pull requests