Open IrynaShcharbakova opened 1 year ago
Try adding src="#".
<img src="#" data-src="/path/to/image" class="lazyload">
@IrynaShcharbakova
Read: https://github.com/aFarkas/lazysizes?tab=readme-ov-file#broken-image-symbol
You could consider doing something similar to...
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="/path/to/image" class="lazyload">
Describe your problem/question When I go to https://validator.w3.org/ to validate HTML of my website, I get an Error: Element img is missing required attribute src.
You can check your demo page http://afarkas.github.io/lazysizes/#examples and see that error. It is true when I replace img by data-src, it affects the HTML structure. The browser does not see image anymore. Or am I wrong? Anyway could you please help to get rid of this error?
Thank you P.S. I have searched but I did not find that issue in the history.
Add tags/keywords img, error, HTML error, attribute
⚠️ Search for existing open/closed issues/discussions before you ask your question. ⚠️ I work on my spare time on helping users out. This means make it easy for me to simply see your live problem and help to fix it. 🤘 No panic: Don't be afraid to ask a question.