Repository navigation
Image: Add transform block support - #86955
Draft
aaronrobertshaw wants to merge 3 commits into
Draft
aaronrobertshaw wants to merge 3 commits into
aaronrobertshaw wants to merge 3 commits into
Conversation
🤖 PR meta 🤖📦 Bundle sizeSize Change: +410 B (0%) Total Size: 8.67 MB 📦 View Changed
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Navigates the list via UP/DOWN arrow keys from action buttons in
|
aaronrobertshaw
force-pushed
the
add/transform-scale
branch
from
November 17, 2026 12:05
b3c19c5 to
439e760
Compare
aaronrobertshaw
force-pushed
the
add/image-transform-support
branch
from
November 17, 2026 12:05
8917e05 to
9a43bf0
Compare
aaronrobertshaw
force-pushed
the
add/transform-scale
branch
from
November 17, 2026 13:41
439e760 to
0c47a94
Compare
aaronrobertshaw
force-pushed
the
add/image-transform-support
branch
from
November 17, 2026 13:41
9a43bf0 to
17f4c59
Compare
aaronrobertshaw
force-pushed
the
add/transform-scale
branch
from
November 18, 2026 01:58
0c47a94 to
bb0ef67
Compare
aaronrobertshaw
force-pushed
the
add/image-transform-support
branch
from
November 18, 2026 05:29
17f4c59 to
3b049e0
Compare
aaronrobertshaw
force-pushed
the
add/transform-scale
branch
from
November 18, 2026 07:40
bb0ef67 to
0797f4a
Compare
aaronrobertshaw
force-pushed
the
add/image-transform-support
branch
from
November 18, 2026 07:43
7bbe90f to
c1103ef
Compare
aaronrobertshaw
force-pushed
the
add/transform-scale
branch
from
November 18, 2026 08:21
0797f4a to
1c1b9c1
Compare
aaronrobertshaw
force-pushed
the
add/image-transform-support
branch
from
November 18, 2026 08:22
c1103ef to
721927c
Compare
aaronrobertshaw
force-pushed
the
add/transform-scale
branch
from
November 19, 2026 11:59
1c1b9c1 to
2d5cff8
Compare
aaronrobertshaw
force-pushed
the
add/image-transform-support
branch
from
November 19, 2026 12:02
721927c to
5b4a45f
Compare
aaronrobertshaw
force-pushed
the
add/transform-scale
branch
from
November 19, 2026 14:06
2d5cff8 to
770bb88
Compare
Image skips serialization of the transform support and applies rotate, translate and scale to its img with getTransformClassesAndStyles(), so the caption stays put. The editor resize box carries the same inline transform, and the transform feature selector also lists it, so Global Styles and block style states reach it too. The lightbox starts its zoom from the transformed image's centre and scale, and the enlarged image drops the transform.
The rotate and offset tests used Image as a block with no transform selector. Image now applies its transform to the img and the editor resize box, so these cases move to Group to keep covering the wrapper, and new cases check the Image selector in block states and Global Styles.
aaronrobertshaw
force-pushed
the
add/image-transform-support
branch
from
November 19, 2026 14:18
5b4a45f to
b23972e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Stacked on #86727. Merge #86240, #86282 and #86727 first.
Related:
What?
Image blocks can now be rotated, offset and scaled. The transform applies to the image, so the caption stays put.
Why?
The transform support styles the block wrapper. For Image, that is the
figure, so the caption would turn with the picture.How?
Image follows its existing Border and Shadow pattern:
rotate,translateandscale, with__experimentalSkipSerialization.save.jsxandimage.jsxaddgetTransformClassesAndStyles()to theimgstyle.selectors.transformtargets theimgand the editor resize box.No deprecation is needed: Image never shipped with this support.
Note
The block outline stays square while the image turns. Dragging a handle on a rotated image is fixed in #86884.
Testing Instructions
Use a theme with
appearanceTools, such as Twenty Twenty-Five.Block values
Global Styles
Screenshots or screencast
86955-image-transform.mp4
Use of AI Tools
Written with Claude Code, then reviewed and tested by hand.