Sorry, we don't support your browser.  Install a modern browser

Automatically add markup for the sizes attribute#62

Most WP themes and even WP itself make very poor use of the size=”” attribute which tells the browser what the best image is to pick out of srcset based on how much space it actually occupies on the page. Poor use or absence of this attribute leads to unncessary KB’s being downloaded which impacts performance, particularly on slower connections.

WP Rocket’s lazy loading could be extended to automatically calculate sizes markup and then add any missing markup and/or replace (generally sub-par) existing markup for all images. This functionality already exists in but there is currently no WP plugin that provides it.

a month ago