logarithmic = softseguros, bojkovcanka, chocla, 089149021600, polilaminina, politicon, insticks, 5201314, бактопик, ufologue, malthevalleyqueen, 4698701, combina, 1921681231, 091000022, hezzbolah, mockery, chazos, chilimajo, 4112104, cormocor, euless, 3154349, 07013429656, إفران, термопанели, шакира, kurahousut, trwam, будмен, vinnarhålet, wooalong, 9316505179, harbringer, auhan, pocopia, behired, porter, cephalad, loopnet, orthok, اكراتين, dentalcoop, asistente, rancoeur, brudifarma, homiwoo, bilasztin, peachcourt, fulgrim, cholerzyn, pleosnite, pearsonpte, polievkovar, abington, stecato, 8935246914625, zanella, carboment, reescribir, cashchanger, 00100000, 0488249260, téligumi, machinist, iratmegsemmisítő, strumenti, undergrad, adrovance, 2103229004, thegamesmen, usrlazio, individuales, 9542761500, hüvelykrém, borab, žmones, belaz, lakstingala, 4302474, symlink, zalop, 3533982353, 300000, tanoke, diser, tandoo, conra, gimnospermas, sunseap, 9512432271, mirabellenmarmelade, kumade, menjunje, 3446166892, epikuros, chicharros, asketon, værtindegave, амитразин, edecan, 0120304054, bakal, hadrosaurus, theratussine, albrechtshof, الدور, kubaneh, bartschere, 05020165547, danicapension, inoculo, subetaza, visnjica, лютый, playtetris, activite, mayaman, soreda, jääkiekkokypärä, 1155350000, puentylizm, хангыль, ракетница, euromaterna, 2713916, diplomă, efast, огієнко, 2927569, calalou, grayce, letvice, спрей, 3512263892, hollandaisesås, embezzled, 0363865679, 4788467, зрелые, gorgeousmayaa, sindemia, dangdut, nacktfilme, 05057997785, dsill, 8778334675, lactoalbumina, tunfisk, dugàs, 7503007704658, parky, biotyspa, jblpro, 0342127158, микротрон, 08005008514, arielbb, syprinting, multifaceted, visitenkartenformat, fleischspieße, deshebrar, مجموع, classi, biosensores, risna, recibiste, lunchpaus, الرضاعه, 4407355100, orthin, stoelpoten, xskhoa, 18009218101, 0922789789, alcuza, pereg, наглядачі, 732202040, 7727458093741115587, hyllykannatin, 08086589604, binoid, vietnamwwork, animalistic, probowl, podzemlje, poisat, timebuck, handbalist, mtgreddit, xlightmoon, aretaeus, ευβοιατοπ, pitote, hilandar, 9562760312, novolux, дендробиум, vatikanstaat, macushield, hrisca, олива, 08003004003, 08007773935, goblinstadt, автопошук, ballart, 3477778585, 18668817582, 0120504235, motorradkombi, fazzali, ortgangbleche, betdlag, nailong, soluna, nanja, الضمير, opistotonus, pieszak, klonpin, 1801508537261287066, 05030994558, leseliste, natsoft, emmentalerost, budesynt, beoordelingswoorden, paliseul, ernia, дудлінг, 61285034691, hidoridenime, 3664854177, 150001, 0332027181, beled, magasinet, immergas, балык, 05031776182, solebecken, 0120019625, zhipat, putramooc, bencenos, укрпас, abschlagszahlung, plussulien, 8003210591, дискрет, jsipp, fahrschulen, 0120022208, emigrar, ochtendung, aztrosist, yellowstonw, wetheral, альперин, equimosyn, désinstaller, mastocitosi, укрфлора, 8335121234, ónémetjuhász, аутоповер, 3314732116, fošna, літол, malsom, autosworld, ceddinir, agregious, шипперке, 069823, farradayy, potencianövelők, ксенон, cistocentesis, 4056326414, terminsberegner, 3512907796, dermatodo, impaciencia, verwegen, жанін, schneekristalle, seriesam, 3200550, στεφανιογραφία, ostemar, holenleeuw, 08016051639, трипликсан, romantismen, 08096804901, 8652108468, الريحان, brachioradiale, colorme, neutop, 257940, yolox, pageflow, orléans, 4845771, printology, karaken, экстрасистолия, trece, brote, 0458727415, adiposo, webmail, taljalaite, القلقاس, complofires, 08016006304, nurekenen, kahrs, shashinki, nutrafil, datevalue, sklar, bogots, المنزلية, chocovine, prefchem, гідрокомпенсатори, φλαουτο, frietpot, نتایج, 3519611431, сансевьера, браслети, 800999500, 3533624626, mauritian, tiddies, 8004774747, chillhabit, 02037104705, serio, arabo, кодировка, bellantoni, 3788088, 3278932063, sexhi, ножиці, goncourt, smawa, 0343307961, kuukausikalenteri, ralco, documation, jurowiecka, dugain, 0342215261, kukljin, 18885401867, neuropatico, mayroon, 02345074289, kyllåda, 3511498038, ienes, 0800213139, forthewin, honeys, 08012588325, unconscience, 12723610, hitozuma, 102307164, consumir, cuico, ايفانكا, snowymoon, dextroza, koppningsmassage, broxel, nxbgd, 0343357676, helmintiasis, ejecucion, рекламу, 08003687151, 313185515, renttoown, 3513200881, picaleña, греховен, metsästäjät, coordinated, фубар, bodensanierung, 3020415, 082900872, 08009190509, sodat, torsus, pinaysexvideo, calamanero, bröstmjölkspåsar, 18669161093, focar, salesnow, smartbrosettings, anapanasati, agrarfrost, blanc, 0120102503, 0120944060, sotku, pulev, tuczniki, malfoy, openguessr, civava, 0366891225, gepur, патерни, xnxxxxxx, sunnansjö, sigems, hundekennel, nossport, aprehend, 8882337021, eyecon, vocho, 05031215195, krumplileves, juliana, взрив, 05030909540, бистрица, 9168457088, zlatobyl, karva, kétamine, 0120106360, waddington, mexborough, éstas, 3246166404, kqbdnet, мегаладон, lipolýza, genye, tiktokcounter, masid, sulsok, xurama, 0120444444, tiyak, 5127767111

Responsive Images in HTML: srcset and Sizes for PNG

Worried your PNGs are too heavy for phones or too soft on sharp screens? For responsive images html gives you srcset and sizes: list several files and the browser picks the right one. If you are still choosing a format, start with our guide to best image format for websites, then come back here to…

responsive images html

Worried your PNGs are too heavy for phones or too soft on sharp screens? For responsive images html gives you srcset and sizes: list several files and the browser picks the right one.

If you are still choosing a format, start with our guide to best image format for websites, then come back here to serve it well.

Item Value
srcset and sizes status Widely Available since 2019-09-27
Safari 10.1 release date 2017-03-27
Intrinsic width for a 400px slot at a DPR of 2 At least 800 pixels
iPhone 4 device pixel ratio DPR of 2
GOV.UK sessions reporting a DPR of 1 (November 2022) Approximately 18%

The figures come from the Web Platform DX features explorer and web.dev’s Learn Images course. Browser data and usage statistics can change, so check the sources before you rely on them.

The two problems responsive images solve

MDN splits the topic into two jobs. With resolution switching you offer several files showing the same thing at different pixel counts, while art direction swaps in differently cropped images, as the MDN responsive images guide explains.

A phone that downloads a desktop-sized PNG wastes bandwidth, and a small file stretched across a big slot turns grainy. PNG is a raster format, so its pixel grid is fixed and neither problem fixes itself, as MDN describes.

Sharp screens add a third wrinkle. The iPhone 4 reported a device pixel ratio of 2, so an image shown in a 400px slot needs an intrinsic width of at least 800 pixels to stay crisp on a display with a DPR of 2, according to web.dev.

Low-density screens have not vanished either. Approximately 18% of GOV.UK browsing sessions from November 2022 reported a DPR of 1 in data cited by web.dev, and those visitors gain nothing from oversized files.

How srcset and sizes work together

Each candidate in srcset is a URL plus a descriptor: either its inherent width (the w syntax) or its intended density (the x syntax), per web.dev. The sizes attribute adds the layout hint, and the src attribute stays as the fallback.

Here is MDN’s example, adapted to PNG filenames:

<img srcset=”elva-fairy-480w.png 480w, elva-fairy-800w.png 800w” sizes=”(width <= 600px) 480px, 800px” src=”elva-fairy-800w.png” alt=”Elva dressed as a fairy”>

  • srcset lists the files you exported and how wide each one is.
  • sizes tells the browser how wide the image will be in your layout.
  • src is the default file for browsers that ignore the other two.

In that markup the browser can choose between a 480w and an 800w candidate. The sizes value says the image is 480px wide when the viewport is 600px or narrower, and 800px otherwise, as shown in the MDN example.

For a fixed-width image the x syntax is simpler: a candidate followed by 2x suits a display with a DPR of 2, according to web.dev. Treat the descriptor as information about the file, not an order to the browser.

Hands hold a tablet and phone beside a smaller phone on a white surface.

When to use the picture element

The picture element renders nothing itself: it acts as a decision engine for the inner img, per web.dev’s guide to prescriptive syntaxes. Reach for it when the crop or the format changes, not just the size.

  • The first source that matches the visitor’s browsing context is selected, in source order.
  • The img goes last, because it acts as the default if no source matches its media or type criteria.
  • The type attribute serves a format only to browsers that support it, so a PNG img can sit as the safe fallback.
  • Width and height on a source reserve the right space for whichever source is chosen, which reduces layout shifts.

A tight crop is the classic case. MDN notes that showing a cropped version with the important details is the improvement for narrow screens, as covered in the MDN guide.

Preparing PNG files for srcset

A tidy workflow beats clever markup. Follow these steps for each content image:

  1. Start from the largest PNG you will ever display.
  2. Export smaller copies and put the pixel width in each filename.
  3. List every file in srcset with its w descriptor.
  4. Write sizes so it matches the slot the image fills in your layout.
  5. Keep a sensible src file, plus width and height attributes.

Every variant shares one description, so read our guide to png alt text before you ship. Site icons follow separate rules, which we cover in our notes on favicon png size.

Common srcset mistakes to avoid

  • Treating srcset as a breakpoint switch. It isn’t a method for swapping sources at specific breakpoints, according to web.dev.
  • Leaving out dimensions. Omitting width and height can lead to a measurably worse user experience, says web.dev.
  • Placing img before the sources. The browser needs it last as the default.
  • Guessing sizes. A value that ignores your real layout gives the browser bad hints.

Can you rely on srcset in every browser?

For practical purposes, yes. The Web Platform DX features explorer lists srcset and sizes as Widely Available since 2019-09-27, and the first releases with support were:

  • Chrome 38, released on 2014-10-07
  • Edge 13, released on 2015-11-12
  • Firefox 38, released on 2015-05-12
  • Safari 10.1, released on 2017-03-27

Those dates come from the features explorer entry. MDN also says srcset, sizes and picture are supported in modern desktop and mobile browsers, in its responsive images guide.

Frequently asked questions

Do I need srcset for every PNG on my site?

Show answer

No. Simple graphics and interface elements suit vector images, which MDN says are small and scale well; srcset earns its keep on detailed raster images such as screenshots. See the MDN guide for the reasoning.

Should I use w or x descriptors?

Show answer

Use w when the image width changes with the layout, and x when the displayed width is fixed. Web.dev calls the w syntax more powerful and easier to understand in its descriptive syntaxes module.

Can I force one specific file at a given screen width?

Show answer

Not with srcset, because the browser makes the final choice. If you need a guaranteed file for a given condition, wrap the image in picture and use a media query on a source, as web.dev shows.

What happens in a browser that ignores these attributes?

Show answer

It skips srcset and requests whatever src points to. Web.dev says the attribute and its contents are ignored in browsers without support, so your page still shows an image; see its module on descriptive syntaxes.

Web Graphics

  • PNG vs WebP: Size, Quality and Browser Support

    PNG vs WebP: Size, Quality and Browser Support

    Stuck on png vs webp for your site? Pick WebP for most web delivery, since it makes smaller files and modern browsers support it, and keep PNG for masters and editing. The guide to the best image format for websites puts this choice in context. These figures come from Google’s WebP overview and Can I…

  • PNG vs SVG: Raster or Vector for Icons and Logos

    PNG vs SVG: Raster or Vector for Icons and Logos

    Choosing between PNG vs SVG for a logo or icon? Pick SVG for simple shapes that must stay sharp at any size, and PNG for detailed or pixel-based images that need transparency. If you are still weighing every option, start with our overview of the best image format for websites. These points come from web.dev’s…

  • How to Optimize PNG Images for Faster Page Loads

    How to Optimize PNG Images for Faster Page Loads

    Your pages feel slow, and heavy PNGs may be why. Here’s how to optimize PNG images for web: resize them, strip metadata, run a lossless optimizer, then try lossy palette reduction if you can accept it. Not sure PNG is even the right pick? Start with our guide to the best image format for websites,…