Skip to content

Error: Element img is missing required attribute src. #992

@IrynaShcharbakova

Description

@IrynaShcharbakova

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions