Skip to content

[6.x] Fix focal point editor performance with large images - #15311

Open
duncanmcclean wants to merge 4 commits into
6.xfrom
focal-point-editor-thumbnail
Open

[6.x] Fix focal point editor performance with large images#15311
duncanmcclean wants to merge 4 commits into
6.xfrom
focal-point-editor-thumbnail

Conversation

@duncanmcclean

@duncanmcclean duncanmcclean commented Aug 31, 2026

Copy link
Copy Markdown
Member

This pull request fixes an issue where the Control Panel's focal point editor becomes slow and janky when working with large source images (multi-MB originals).

This was happening because both the picker image and the nine preview crop frames rendered the full-size original image, forcing the browser to decode and paint the huge image ten times over.

This PR fixes it by adding a large Control Panel thumbnail preset (1600px, fit: contain) alongside the existing small one in Manager::cpManipulationPresets(). It's exposed on CP asset payloads as large_thumbnail, and the focal point editor now uses it for both the picker image and the preview frames, so the original image is never decoded at all. 1600px was chosen to keep the previews sharp at the editor's display size, including the zoomed preview frames. The preset is served through the existing CP thumbnail route, so it works the same for both public and private asset containers.

Note there's a brief one-time wait the first time the editor opens for a given asset, while the 1600px derivative is generated. After that, it loads instantly.

Fixes #15270

…view image

improves performance when working with large source images (#15270)
@jasonvarga

Copy link
Copy Markdown
Member

I don't know if this actually fixes anything. When I throttle my performance in the devtools, it still feels a bit janky. But now you also lose quality.

…full preview image"

This reverts commit 3af047c.

the small listing preset is too low quality for the preview frames, and the main picker image was still decoding the full-size original
…loads

a 1600px preset generated through the existing cp thumbnail route, so it works for both public and private containers
both the picker image and the nine preview frames render the same 1600px thumbnail, so the full-size original is never decoded (#15270)
@duncanmcclean

Copy link
Copy Markdown
Member Author

Yeah, fair enough.

I've added a new large CP thumbnail preset (1600px) which is used in the focal point editor so we don't need to use the raw image but also don't lose out on image quality, even when zoomed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Focal point editor performance

2 participants