Auto-sizes for Lazy-loaded Images

plugin banner

Adds support for automatically calculating the sizes attribute for lazy-loaded images.

Author:WordPress Performance Team (profile at wordpress.org)
WordPress version required:6.8
WordPress version tested:6.9
Plugin version:1.7.0
Added to WordPress repository:19-01-2024
Last updated:02-12-2025
Rating, %:0
Rated by:0
Plugin URI:https://github.com/WordPress/performance/tree...
Total downloads:318 686
Active installs:50 000+
plugin download
Click to start download

This plugin implements enhancements for the responsive images functionality in WordPress. Currently, this includes:

  1. Improvements to the accuracy of the sizes attribute by using layout information available in block themes. This enhancement is not available to classic themes.
  2. Implementation of the new HTML spec for adding sizes="auto" to lazy-loaded images. This enhancement was merged into WordPress 6.7.

See also the complimentary Image Prioritizer plugin which detects which images are outside the viewport, and then adds loading=lazy and sizes=auto to them.

There are currently no settings and no user interface for this plugin since it is designed to work without any configuration.


FAQ
ChangeLog