[wp-trac] [WordPress Trac] #40439: Save progress of intermediate image creation after upload
WordPress Trac
noreply at wordpress.org
Sun Jun 24 19:41:33 UTC 2018
#40439: Save progress of intermediate image creation after upload
-------------------------------------------------+-------------------------
Reporter: mikeschroder | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 5.0
Component: Media | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing needs-unit- | Focuses: ui
tests |
-------------------------------------------------+-------------------------
Changes (by azaozz):
* keywords: needs-patch => has-patch needs-testing needs-unit-tests
* focuses: => ui
Comment:
In 40439.patch:
- Abstract/expose creating of an image sub-size in class-wp-image-editor-
imagick.php and class-wp-image-editor-gd.php. Note that I didn't change
the signature of Class_WP_Image_Editor as "something" may be extending it.
- Refactor `wp_generate_attachment_metadata()` a bit, move the creation of
image sub-sizes to a new function: `_wp_create_image_subsizes()`.
- Add couple more helper functions for creating and checking of image sub-
sizes.
- Add `wp_update_image_attachment_sizes()` that tries to create all
missing sub-sized of an image.
- Add `wp_check_image_attachment_sizes()` that is used to check whether
all sub-sizes were created successfully.
- Use the above function in the Media Library list-table to check for
missing image sizes and add a button if any are found, so the user can
create them.
- Add AJAX for the above.
This started as a "quick test" to see exactly how difficult it may be to
add that functionality (I know, it's Sunday, but...) :)
TODO: needs UI/UX review and perhaps some design for how to add the
messages and the button to the Media Library grid view (and the media
modal?). Also probably needs some cleanup, and of course: testing!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40439#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list