After implementing Image Resizing, it seems clear that CF Polish and Mirage should be turned off. The Speed Optimization Recommendations advises that explicitly. I suppose the Image Resizing worker is taking care of their functions for the most part.
My question is about Lazy Loading. Does Image Resizing implement lazy loading by default (along the lines of Mirage)?
If so, my trouble arises because I do not want above-the-fold header images to be lazy loaded. Would there be a way to fine tune things and exclude them from lazy loading?
I should mentioned that I am also using CF APO and the wp-rocket plugin on this WordPress site. Wp-rocket uses a javascript lazy loading solution and does allow exclusions. For this reason, my preference is for the wp-rocket lazy loading parameters to carry forward to Cloudflare Image Resizing.
Typically, lazy-loading is done by adding the appropriate directives to your HTML. Javascript also works, and is the older method from before browsers natively supported it (and are probably still more flexible).
Both methods are independent of the image URLs and anything done by Image Resizing, so using Image Resizing shouldn’t affect it. I’ve never used Mirage, so I don’t know how badly it would play with Image Resizing, but your existing lazy-loading Javascript should continue to work just fine.
Yes, but I am wondering if either CF Image Resizing or APO are adding
loading="lazy"
to image links.
This blog post implies some kind of lazy loading happening with the APO service activated.
I am hoping that someone with knowledge of how that service works could explain further. I suppose the title of this Topic could have been “Cloudflare APO - default lazy loading?”
I should add, however, that my tests indicate that Image Resizing" is the culprit.
I thought when Image Resizing processes an image it rewrites the image URL like this:
And I am wondering if that rewriting includes the addition of a loading=lazy parameter. I don’t see it in any of the documentation, but it sure seems like to me.
OK. Thank you for confirming that Cloudflare Image Resizing does not add attributes (like loading=lazy) to the HTML output. It only rewrites the image URLs.