Cookies publicitaires

Nous utilisons des cookies publicitaires pour mesurer l'efficacité de nos campagnes. Vous pouvez les refuser sans que cela affecte votre navigation. En savoir plus

Resources · Guides

<picture> vs native srcset: why ImagePipe replaces one with the other

WordPress natively generates a srcset attribute on every media library image. ImagePipe systematically removes it on the spots it replaces, not to replace it with its own srcset, but in favor of a <picture> that plays a different role.

Illustration: overlapping picture frames, symbolizing the picture tag replacing native srcset August 27, 2026

WordPress's native srcset offers the browser several sizes of the same file (thumbnail, medium, large…) generated at upload time, so it can pick the one best suited to the display width and screen density (retina). That's a size-selection mechanism.

ImagePipe's <picture> offers the browser several formats of the same visual, at the same size (AVIF, WebP, JPEG fallback) via <source> tags, so it can pick the lightest one it can decode. That's a format-selection mechanism, a different role, not competing in theory, but incompatible in practice on the same tag.

The reason: if WordPress's native srcset stays present alongside ImagePipe's <picture>, the browser may pick a native srcset candidate (a classic WordPress size, in JPEG or PNG) rather than honoring the <picture>'s <source> tags. ImagePipe therefore systematically removes srcset and sizes on the spots it automatically replaces, so its own <source> tags remain the sole source of truth on the format side.

What this means in practice: each ImagePipe preset (product_card, product_page…) serves a single size, already calibrated for its exact spot in the theme, rather than a set of candidate sizes. The right size isn't chosen by the browser through a srcset then, it's already decided upstream by the preset you've configured for that spot. See also the guide on sizing presets for a custom theme.

Back to guides