An image has a srcset attribute with no value. The HTML spec requires srcset to contain at least one image candidate, so srcset="" is invalid markup. Browsers ignore it and fall back to src, which means the page loses responsive images, often because a lazy-loading script or template left the attribute behind.
<img src="/images/team.jpg" srcset="" alt="Our team">
The browser discards the empty srcset and loads src at every screen size. Phones download the full desktop image, and high-density displays never get the sharper version.
bseoa looks for width descriptors such as 480w, so it also reports a srcset that only uses pixel-density descriptors, like srcset="/team.jpg 1x, /[email protected] 2x". That markup is valid; if that is what the page uses, you can ignore this warning for those images.
data-srcset and leave srcset="" as a placeholder until the image scrolls into view.srcset="{{ image.srcset }}", even when no resized versions exist.If there's only one size of the image, drop srcset and give the image explicit dimensions:
<img src="/images/team.jpg" width="1200" height="800" alt="Our team">
If you have resized versions, list them with width descriptors and add sizes so the browser can choose:
<img src="/images/team-800.jpg"
srcset="/images/team-480.jpg 480w,
/images/team-800.jpg 800w,
/images/team-1600.jpg 1600w"
sizes="(max-width: 600px) 100vw, 800px"
width="800" height="533"
alt="Our team">
If a lazy-loading script is creating the empty attributes, native loading="lazy" works in current browsers and keeps the real srcset in the HTML. Don't lazy-load the image most likely to be the Largest Contentful Paint element.
<img src="/images/team-800.jpg"
srcset="/images/team-480.jpg 480w, /images/team-800.jpg 800w"
sizes="(max-width: 600px) 100vw, 800px"
loading="lazy" width="800" height="533" alt="Our team">
Oversized images on mobile are one of the most common causes of slow Largest Contentful Paint, and Google uses mobile-first indexing. Keeping real image URLs in src and srcset, rather than only in data- attributes, also makes sure crawlers can discover the images.
This issue can affect your site's search engine rankings and user experience. Addressing it promptly helps ensure optimal performance and visibility in search results.
bseoa automatically checks for this warning during site analysis, along with hundreds of other technical SEO issues.
Choose the license that fits your needs and start getting the deep, actionable insights you deserve.