HTML Guide for loading
The loading attribute on the img element only accepts the values eager or lazy.
The loading attribute is used to specify lazy loading behavior for images and only accepts the values "lazy" or "eager" (which is the default).
Explanation:
- The loading attribute hints to the browser whether to load the image immediately ("eager"), defer until it reaches a calculated distance from the viewport ("lazy").
- Using values other than "lazy", "eager" results in validation errors and browsers ignore the attribute.
- Never use numeric values or case-variants; always use the lower-case string values above.
Incorrect Example:
<img src="logo.png" alt="Company logo" loading="1">
Correct Example:
<img src="logo.png" alt="Company logo" loading="lazy">
Replace the incorrect value with loading="lazy" or loading="eager", or remove the attribute, to resolve the validator issue.