-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image: Batch image edits #22959
Image: Batch image edits #22959
Conversation
cc80459
to
6de653b
Compare
@ajlende What's left here? |
The quick list is:
I'm afraid there isn't going to be a way around this being a big PR. Lots of the changes are interconnected. |
What are the options? If it's marked as experimental, we can still change it in the coming days.
I think we'd like to move towards previewing in JS (using a blob url). This would be the closest structurally to replacing the src afterwards. I wouldn't get stuck too much on the previews in this PR. |
I'm wondering if we'll have to roll our own cropper/editor. This component could also be combined with the resizer that we currently have. If we reuse the same element, this would also avoid a re-render between view and edit mode (avoiding an image reload). |
Wouldn't it be better to use - https://core.trac.wordpress.org/ticket/50244 ? |
@spacedmonkey Maybe it would be part of the answer? Right now the existing endpoints for crop/rotate/flip each generate a new image, and one of the main purposes of batching was to avoid that. Even if we passed a filename or overwrite flag, writing to disk for each image edit also seems like it might be quite slow. I'd also like to maintain the statelessness of the endpoints, so I wouldn't want to make the existing endpoints just queue up and not apply the edits. That's why I ended up with a new endpoint. I hadn't seen that trac ticket yet, so if you have other suggestions I'd be happy to hear 🙂 |
6de653b
to
c2f8b5f
Compare
If we're blocked at flipping the image, could we temporarily remove that option? |
This seems more like a feature that could use time to mature in the Gutenberg plugin before being added to core. I would suggest holding off on 5.5 and instead give it more time and then add it to 5.6. |
I've merged #23284. I hope we can easily build further on that. :) |
Description
Adds the ability for edits to be previewed in the browser before saving the file on the backend.
TODO
How has this been tested?
TODO
Screenshots
TODO
Types of changes
Fixes #22580
Fixes #22579
Fixes #22566
Checklist: