Native lazy loading on WordPress 5.5 and SPAI compatibility

In WordPress 5.5, images are lazy-loaded by default, using the native HTML loading attribute which became a web standard earlier in 2020. This means that WordPress will add loading="lazy" to all img tags that have width and height attributes present. 

Now, if ShortPixel Adaptive Images is activated, it will lazy load all images, whether they have the mentioned attributes or not. If you wonder what happens between SPAI and WordPress 5.5, here are the two scenarios:

  • If the option "Native lazy-loading" is enabled, ShortPixel will add loading="lazy" to all images, so the lazy-load effect will be similar to WordPress' default one. The only difference is that your images will be optimized and resized in addition to native lazy-loaded (because that's SPAI's purpose).

    Note that there will not be any duplicated attributes or any conflicts with WordPress' default behaviour.

  • If the option "Native lazy-loading" is disabled, ShortPixel will lazy load all images using JavaScript. This is a more efficient option, because the native lazy loading considers a very large viewport, meaning that for normal sites it loads almost all the images when the page loads, even if they are not visible. This makes native lazy-loading useful for very "long" pages with lots of images on them.

    In this case, there is no compatibility issue either.

In short, it does not matter what method you use to lazy load your images: ShortPixel Adaptive Images will not cause any performance or compatibility issues with WordPress 5.5.

Note: SPAI's "Native lazy-loading" setting is located on Settings > ShortPixel AI > Areas.

Still need help? Contact Us Contact Us