sandywp / plugins / disable-auto-sizes
Disable Auto-Sizes
A lightweight plugin to disable the automatic addition of the auto value in the sizes attribute for images in WordPress.
Ready in seconds.
v1.0 60+ installs WP 6.7.1+ PHP 7.2.24+
About this plugin
The “Disable Auto-Sizes” plugin prevents WordPress from adding the auto keyword to the sizes attribute for images. This ensures full control over the sizes attribute and is useful for advanced customization or debugging.
Features
- Disables the automatic addition of the
autovalue in thesizesattribute for<img>tags. - Lightweight and easy to use.
- Useful for developers and advanced users managing responsive image behaviors.
Questions
- Why should I disable the `auto` value in the `sizes` attribute?
Disabling the
autovalue gives you full control over thesizesattribute for images. This can help in debugging or custom responsive image implementations.- Does this affect image rendering in any way?
No, it simply prevents WordPress from adding the
autokeyword to thesizesattribute. You can still define customsizesattributes as needed.- Can this plugin be used with all WordPress themes?
Yes, it works with any theme as long as your theme supports WordPress’s native responsive image functionality.
sandywp / also on the shelf
Try another plugin
50K+ installs
Improvements for responsive images in WordPress.
Spin up a real WordPress site in seconds.
Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.