Image Resizing - Google Page Insights

We have been implmenting the cdn-cgi paths into all our image loads, in order to leverage the image resizing feature.

It is working well, and we can see correct image sizes on the front end, and usage in the CF account.

However, we are not seeing positive results from Google Page Insights, which is reporting;

“properly size images”

An example image has been implemented as follows;

<img loading=lazy src="[/cdn-cgi/image/width=734,height=608,quality=100//wp-content/uploads/2020/10/01-1.png](https://www.playdale.co.uk/cdn-cgi/image/width=734,height=608,quality=100//wp-content/uploads/2020/10/01-1.png)" srcset="[/cdn-cgi/image/fit=contain](https://www.playdale.co.uk/cdn-cgi/image/fit=contain),[width=1920//wp-content/uploads/2020/10/01-1.png 2x](https://www.playdale.co.uk/width=1920//wp-content/uploads/2020/10/01-1.png)" alt="">

Where google is reporting a size of 2,075.0 KiB and potential saving of 1,678.4 KiB

Could anyone advise what the correct implementation would be of the above example, in order to achieve something close to the potential saving google suggests?

I think this is for the image located in the src="" and probably Google’s thinking the .png could be switched with .webp for the savings (not total savings from all of the images on the URL, but rather on this particular?).

Nevertheless, even if we are using a Pro plan and Polish & Mirage options, I remember Google still thrown the warnings/errors for the jpg images which were delivered and rendered as a webp in the visitors Web browser.

So, kind of “a gap” between the “insights results” and the working things for the website visitor.

You are also missing alternative text → SEO :wink:

I am not sure how Google determines this, by the screen width, or device pixels ratio, and compare to the image size if it fits?

Or rather Google expects it to be <picture> element with default <img> (due to the fallback) and then <source> properly defined with the srcset, media and type attribute so it can pick wheather it needs for “Desktop” vs “Mobile” testing …

I am just guessing …

Otherwise, maybe it saw some metadata from the image(s) could be striped out and that way saved few bytes as well?

May I ask for the URL which you have tested?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.