[wp-trac] [WordPress Trac] #64725: Background block support: render uploaded images as <img> for responsive image support
WordPress Trac
noreply at wordpress.org
Fri May 15 06:12:42 UTC 2026
#64725: Background block support: render uploaded images as <img> for responsive
image support
-------------------------+-------------------------------------------------
Reporter: JosVelasco | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: javascript, css, tests,
| performance
-------------------------+-------------------------------------------------
Changes (by sanayasir):
* keywords: has-patch has-unit-tests needs-testing => has-patch
Comment:
Tested this patch on WordPress Beta 7 and verified that the implementation
behaves as expected and aligns with the requirements outlined in the
ticket.
Tested scenarios
Group block with background image using cover and no-repeat
Group block with background image using contain and no-repeat
Background images using explicit tiling values: repeat, repeat-x, and
repeat-y
Background images with background-attachment: fixed
Results
Confirmed that background images using cover or contain without tiling are
now rendered using a native <img> element instead of a CSS background-
image.
Verified that the rendered <img> includes responsive and performance-
related attributes such as srcset, sizes, loading="lazy", and
decoding="async".
Confirmed that no-repeat is treated equivalently to an unset repeat value.
Verified that explicit tiling values and background-attachment: fixed
correctly continue using the CSS background-image rendering path.
Confirmed that position: relative is applied to the wrapper only when
necessary and does not override any existing position styles.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64725#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list