Image blocks within row blocks do not have custom sizings supported on published page #48295
Labels
[Block] Group
Affects the Group Block (and row, stack and grid variants)
[Block] Image
Affects the Image Block
[Feature] Layout
Layout block support, its UI controls, and style output.
[Type] Bug
An existing feature does not function as intended
Description
If you add an image block into a row block, and then set custom sizings for that image block (whether by dragging to resize, or setting a % in the block settings sidebar), that custom sizing won't be supported on the published page view.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
For example, here is an image in the editor:

... and that same row/image on the published page:

From what I can tell, this seems to maybe be an artifact of the differences in how we apply that sizing combining with the flex display here.
In the editor, we wrap the
img
in adiv
with some styling set directly in thestyle
attribute, including some additional flex handling. In the published page, there is no such wrappingdiv
, and the size is just translated towidth
andheight
attributes directly on theimg
.Environment info
Theme was Twenty Twenty-Three, but it reproduces on multiple.
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: