the src of my images is swapped for data-src when lazy loading is enabled via a plugin

152 Views Asked by At

Hoping you can assist me with this...

I have installed a plugin to optimize my images, so far so good. The problem arises when I enable lazy loading and the HTML source of my image changes to something like this:

<img alt data-src="wp-content\uploads\2023\06\ryan-ancill-Vew4xyLkpdY-unsplash-2.jpg" class="lazyload" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==">

My original HTML was like the below:

<img src="/wp-content/uploads/2023/01/edvin-johansson-w__Je4M6Lqc-unsplash.jpg" width="25%" alt="">

This causes the images being completely missing from my page and other urls… What do I need to do in order to prevent this from happening?

0

There are 0 best solutions below