[wp-trac] [WordPress Trac] #61612: REST API: image cropping is broken
WordPress Trac
noreply at wordpress.org
Tue Jul 9 19:55:01 UTC 2024
#61612: REST API: image cropping is broken
--------------------------+-----------------------
Reporter: ellatrix | Owner: (none)
Type: defect (bug) | Status: new
Priority: high | Milestone: 6.6
Component: REST API | Version: trunk
Severity: major | Resolution:
Keywords: | Focuses: rest-api
--------------------------+-----------------------
Description changed by ellatrix:
Old description:
> When cropping an image in the editor, the REST API request looks correct:
>
> {{{
> {
> "src": "http://localhost:8888/gutenberg/wp-
> content/uploads/2024/07/image-1.webp",
> "modifiers": [
> {
> "type": "crop",
> "args": {
> "left": 26.566666666666666,
> "top": 0,
> "width": 46.86666666666667,
> "height": 100
> }
> }
> ]
> }
> }}}
>
> But the REST API returns the same, uncropped image.
>
> To double check, that it's a core bug, I've checked out the Gutenberg
> `wp/6.5` branch, and confirmed that the bug is still present (with the
> 6.6 core/REST API).
New description:
When cropping an image in the editor, the REST API request looks correct:
{{{
{
"src": "http://localhost:8888/gutenberg/wp-
content/uploads/2024/07/image-1.webp",
"modifiers": [
{
"type": "crop",
"args": {
"left": 26.566666666666666,
"top": 0,
"width": 46.86666666666667,
"height": 100
}
}
]
}
}}}
But the REST API returns the same, uncropped image.
To double check, that it's a core bug, I've checked out the Gutenberg
`wp/6.5` branch, and confirmed that the bug is still present (with the 6.6
core/REST API).
Here's the filed Gutenberg issue:
https://github.com/WordPress/gutenberg/issues/63319
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61612#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list