Questions on the lazyload method

46 Views Asked by At

I added the lazyload to the image tags. Saw the loading and then the actual image. I was shocked to see the code change (src, lazyloaded) when viewing the source code.

Source code:

<img src="/assets/img/1px.png" data-src="/assets/img/comparison/esg-father-son1.jpg?v=20200927" class="lazyload" alt="ESG." />

Desktop output:

<img src="assets/img/comparison/esg-father-son1.jpg" data-src="assets/img/comparison/esg-father-son1.jpg?v=20200927" class= "lazyloaded" alt="ESG" />

Why are the src part and the src part from the browser's source code different?

It seems like the lazyloading was working. It begs the question, Why the desktop did not show the 1px image on the source code of the browser?

0

There are 0 best solutions below