NEWSLayers closes first external funding round led by LOI VentureRead more
← Back to Changelog

Sizes Attribute for Early Hints

A Sizes Attribute settings field showing a media query, with a dashed arrow to the resulting imagesizes attribute in the early hints preload Link header

Early hints image preloads now support a configurable sizes attribute, so browsers can pick the right srcset width for each viewport instead of guessing. Set a media query like (max-width: 600px) 100vw, 50vw from Configure → Performance, or override it per request via responseOptions.mediaPreloads.sizes. Layers sends it as the imagesizes attribute on the preload Link header, right alongside your existing srcset sizes.

Learn more

ImprovementAPIPerformanceEarly Hints