Lazy-Load and missing image dimensions
Lazy-Load adds the attribute loading="lazy" to images and iframes so that the browser only fetches them when they move into view. Images additionally get decoding="async". The switch is on by default.
Where the plugin adds them
- Post and page content
- Featured images
- Avatars
- Text widgets
- The logo of the website
Setting it up
- The “Lazy-Load” item is in the sidebar as the last entry of the “Speed” group.
- Check the “Lazy-Load active” switch there; it is on by default.
- For the image dimensions, switch to the “Optimization” (in German: „Optimierung“) group, item “Images”, and switch on “Add missing dimensions” there.
- “Big image threshold (pixels)” states the edge length from which WordPress scales uploaded images down: the default is 2560, allowed are 0 to 8000, and the value 0 switches the scaling down off.
- The plugin does not accept values between 1 and 255 — the threshold then stays at what WordPress itself specifies.
Existing loading attributes are not overwritten: if an image already has one in the markup, it stays unchanged. In feeds the plugin adds nothing.
Missing width and height attributes
“Add missing dimensions” reads the real pixel dimensions from the image file and adds missing width and height attributes in post and page content, in order to avoid layout shifts. This only works for files that are stored locally on the server; images from external hosts stay unchanged. The dimensions determined are cached per file for one day.
Was this article helpful?