

Media Library attachment details
Media Pair adds art direction to WordPress Media Library images. Upload a desktop image, pair a separate mobile composition once, and the plugin outputs semantic <picture> markup across blocks, featured images, and theme image functions.
<picture> output via core WordPress filterswp_content_img_tagmedia_pair_get_picture() helper for themes and ACF blocksMedia Pair stores a link between a desktop attachment and a separate mobile attachment. When WordPress renders the desktop image on the frontend, the plugin wraps it in a <picture> element:
<source> tag serves the mobile image at or below your configured breakpoint.<img> remains as the fallback for larger screens.Pairing happens once per image in the Media Library. You do not need to configure individual posts, blocks, or pages. Anywhere WordPress outputs that attachment — featured images, Image blocks, galleries, theme templates, or custom code using wp_get_attachment_image() — the paired markup is applied automatically.
The frontend uses pure HTML and CSS media queries. No JavaScript is loaded for visitors.
You can also manage pairs from:
Each mobile image can only be linked to one desktop image. An image already used as someone else’s mobile variant cannot be given its own pair.
Go to Settings Media Pair:
<picture> output on or off globally.767. Screens at or below this width load the mobile source.<picture> elements. Default: media-pair.Media Pair hooks into standard WordPress image rendering:
wp_get_attachment_image() — theme templates, widgets, and custom codepost_thumbnail_html — featured imageswp_content_img_tag — inline images in post and block content, including Image, Gallery, and Media & Text blocksImages without a mobile pair are left unchanged.
Use media_pair_get_picture( $attachment_id, $size, $attr, $context ) in themes or ACF blocks when you need explicit control over picture output.
Use the media_pair_should_use_pair filter to allow or skip pairing for specific attachments or render contexts.
Media Pair does not send data to external services and does not track users.