Lazy Loading Images

Hello,

I saw this old post about lazy loading images.

I’m using WP Rocket which lazy loads images that use native WordPress functions. Does X/Pro theme not use the native WP functions for images?

Regards,
Rodrigo

Hey Rodrigo,

Most plugins in general will filter the WordPress content and will work WordPress functions like the_post_thumbnail. That means it will filter HTML image tags from the said areas and add their own attributes to enable or use a feature like lazy loading.

X/Pro uses WordPress standard functions in the template files so that means the third party plugins that uses the same will work.

The only thing you need to take into account is if the plugin could read image tags inside a shortcode because if not, the lazy loading will not work for the Image element and V2 elements because they’re inside a shortcode.

Regretfully, in that case, there is no solution but to create your own elements and add attributes required by your lazy load plugin. This requires developer knowledge and we can’t answer questions regarding custom development.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.