Img loading="lazy"


The Cwicly Image block Lazy Load setting doesn’t seem to impact the code on the front-end,
either checked or not, attribute loading=“lazy” appears.

One difference though :
if the CC setting LAZY LOAD is checked
the attribute appears as the last img attribute

while if CC setting LAZY LOAD is unchecked
then the attribute appears as the first img attribute

As W3C says that the order of attributes does not matter, this doesn’t have any impact on the fact the image would be lazy loaded or not, right?

Am I missing a setting in WP or is this just not working as expected?

I am using WP 6.0.2 and CC

Thank you in advance!

Hi there @JuGa,

Thanks for bringing this to light.

Just to clear things up

WordPress automatically adds Lazy-Loading to all images, whether the specific property is toggled in Cwicly or not.
We have found ourselves in quite a few situations where we needed to deactivate this automatic feature (with a code snippet), thus explaining why Cwicly does provide this property if you manage Lazy-Loading yourself.

I see. Thank you @Louis for your answer.

The more I dig into Cwicly the more I think need to be created a more indepth documentation that could include a lot of the tips and philosophy/principles you put in place. Some are expressed in this discourse some in videos (including your lives), which is not always easy to find when in needs. I realize it is not so easy to put in place as a lot has to do with principles of css rather than directly Cwicly.

Thanks for making things a bit more clear @Louis.
Now, it makes sense.

I’d suggest to make that more understandable, adding a small tooltip icon or something.
Currently it might be kind of misleading.

As soon as available, I’m looking forward to some useful code snippets you are sharing on the cloud :sunglasses:


Agree or could even come as a setting in order to use it that would take control of WP lazyloading as, as it is, this setting can’t been used.
And yes the library of snippets and stylesheets is exciting!

1 Like
  1. automatic lazy load is stupid, because the photo that is in the initial viewport can’t have lazy load it’s supposed to have the opposite, i.e. preload like something!

  2. lazy load applies to everything below the scrolling screen.


So, considering that we can use WP lazyload, what about an option to disable lazyload for an image by adding loading=“eager” instead of “lazy”? For instance for images above the fold.

It works by manually adding an attribute, but a shortcut would be nice :slight_smile:

How about a general backend option to disable lazy load?

Still couldn’t figure out how it’s helpful forcing this on users by default.
Cwicly could fix things with a single toggle.

Maybe because of sunday bloggers who don’t know anything about web and upload some 8Mo PNGs on their WP and ruin bandwidth?

But of course a toggle for developpers would be nice.

It’s fine doing it, as the majority benefit from it, I guess, but not providing an option to disable it is just ridiculous.

There are dedicated media settings, right?