---
title: "What is srcset?"
term: "srcset"
description: "srcset is an HTML attribute for img and source elements that lists several versions of an image at different sizes or pixel densities, so the browser can download the one best suited to the visitor's screen."
url: "https://glossary.io/srcset/"
published: "2026-11-22T20:45:08.595Z"
updated: "2026-11-22T20:45:08.595Z"
topics:
  - "Web development"
wikidata: "https://www.wikidata.org/wiki/Q95956466"
---

# What is srcset?

**Definition:** srcset is an HTML attribute for img and source elements that lists several versions of an image at different sizes or pixel densities, so the browser can download the one best suited to the visitor's screen.

With srcset, an image can offer, for example, a small, medium and large file, each labeled with its width in pixels, or 1x and 2x versions for standard and high-density displays. Used with the sizes attribute, which tells the browser how wide the image will appear in the layout, it lets the browser choose before downloading, so phones are not forced to load images meant for large desktop screens.

Responsive images built with srcset reduce page weight and can improve loading metrics such as [Core Web Vitals](https://glossary.io/core-web-vitals/). Coywolf has argued that srcset works best when it is used for more than serving resized copies of the same image, and each version still benefits from good compression, modern formats such as [WebP](https://glossary.io/webp/) and [lazy loading](https://glossary.io/lazy-loading/) where appropriate.

## srcset resources

- [Why you should do more than resizing images with the srcset property](https://coywolf.com/news/web-development/why-you-should-do-more-than-resizing-images-with-the-srcset-property/)

## Related terms

- [Core Web Vitals](https://glossary.io/core-web-vitals/)
- [lazy loading](https://glossary.io/lazy-loading/)
- [WebP](https://glossary.io/webp/)

**Topic:** [Web development](https://glossary.io/topics/web-development/)

## Cite this definition

- APA: What is srcset? (2026, November 22). Glossary. https://glossary.io/srcset/
- MLA: “What Is srcset?” Glossary, Coywolf, 22 Nov. 2026, glossary.io/srcset/.
- Chicago: “What Is srcset?” Glossary. Coywolf. November 22, 2026. https://glossary.io/srcset/.

Published November 22, 2026.
