WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.3k stars 4.11k forks source link

Image block always ads lazy loading #57973

Open flipflap opened 7 months ago

flipflap commented 7 months ago

What problem does this address?

The image block and gallery ads the loading="lazy" to every image. But images in the viewport (Below the fold) shouldn't have it for website performance reason (PageSpeed). The featured image on the other side doesn't ad it.

What is your proposed solution?

The image and gallery block should habe a native option setting, to ad loading="lazy" as well ad the featured image.

flipflap commented 7 months ago

@ndiego

skorasaurus commented 7 months ago

Related, this was requested specifically for the cover block in https://github.com/WordPress/gutenberg/issues/46789#issuecomment-1664245185

evantishuk commented 5 months ago

Also noted (and closed) 5 years ago here:

https://github.com/WordPress/gutenberg/issues/15753

Kinda thinking this might not get integrated.