Function to add directly below each that appears in the_content() – Lazy loading images

I’m implementing a lazy loading solution to a WordPress theme I’m currently working on using bLazy.js (https://github.com/dinbror/blazy).

I am have some code in my functions.php which is successfully adding the relevant classes and placeholder image to each image that is returned by the_content.

Lazy loading of the images is working correctly, however at the moment when JS is disabled in the browser all the user can see is a grey placeholder image.

I am looking for a way to add a fallback below each and every instance of my lazy-load modified image in the_content.

Read more here:: <a href=https://wordpress.stackexchange.com/questions/345835/function-to-add-noscript-directly-below-each-img-that-appears-in-the-content target="_blank" title="Function to add directly below each that appears in the_content() – Lazy loading images” rel=nofollow>Function to add directly below each that appears in the_content() – Lazy loading images

Leave a Reply

Your email address will not be published. Required fields are marked *