[wp-trac] [WordPress Trac] #64725: Background block support: render uploaded images as <img> for responsive image support
WordPress Trac
noreply at wordpress.org
Wed Feb 25 19:18:12 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 | Keywords: has-patch has-unit-
Focuses: javascript, css, tests, | tests needs-testing
performance |
-------------------------------------+-------------------------------------
For blocks using the background block support (e.g. Group), uploaded
background images sized Cover or Contain with no tiling are now rendered
as a native <img> element instead of CSS background-image.
This gives browsers access to srcset/sizes for responsive image selection,
loading="lazy" for deferred loading, and decoding="async" for non-blocking
decode benefits that CSS background-image cannot provide.
'no-repeat' is treated the same as unset (both compatible with object-
fit). Only explicit tiling values (repeat, repeat-x, repeat-y) and
background-attachment:fixed keep the CSS path.
The block wrapper receives position:relative to contain the absolutely-
positioned <img>.
A guard prevents stomping any existing position: rule already on the
wrapper.
== Gutenberg PR ==
https://github.com/WordPress/gutenberg/pull/75885
== Core PR ==
https://github.com/WordPress/wordpress-develop/pull/11050
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64725>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list