Exclude image from lazy load via image id not working
-
Hi there – Smush is currently lazy loading the logo in my header and it adds additional padding in the initial load of the logo image. If I turn off the lazy load feature, it solves the issue. But obviously I want to use lazy loading.
Following the instructions here: https://wpmudev.com/forums/topic/smush-pro-how-to-exclude-a-specific-image-from-lazy-loading-by-image-id/ I added an image id to my logo, then added the id to the excluded Classes & IDs of the Lazy Load section of my Smush Settings. I cleared the cache, then ran a Google Page Speed test. The images in the Google Page Speed test still show the logo with the extra padding, which causes a huge Cumulative Layout Shift, which Google doesn’t like.
As an additional test, I removed the id I added, replaced it with a class and did the same in the excluded Classes & IDs of the Lazy Load section of my Smush Settings, but that did not work either.
If I deactivate Smush lazy loading then the issue goes away, but again I obviously want to use lazy loading.
Thoughts on how to fix this?
- The topic ‘Exclude image from lazy load via image id not working’ is closed to new replies.