Make WordPress Core

Opened 9 months ago

Last modified 6 months ago

#40439 new enhancement

Save progress of intermediate image creation after upload

Reported by: mikeschroder Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Media Keywords: needs-patch
Focuses: Cc:


When uploads fail with an HTTP Error, a user currently has no recourse other than to re-upload media and hope that it makes it the next time.

Currently, WordPress only saves data about intermediate sizes in meta after all of the sizes have been completed on upload. This means that every time a user attempts to re-upload, WordPress is required to resize *every* intermediate size necessary over again during this retry.

WordPress should save the progress of each successful image resize/intermediate so that it can be resumed on retry.

See #39647 for the global ticket on solving HTTP Error issues on upload.

Change History (5)

This ticket was mentioned in Slack in #core-media by mike. View the logs.

9 months ago

#2 @enshrined
9 months ago

If it's of any interest I had a play with this issue as a plugin here https://github.com/darylldoyle/WP-Background-Image-Processing.

It stops creating image sizes on upload and then uses the background processing library by deliciousbrains to create intermediate sizes in the background.

#3 @nosilver4u
9 months ago

Be careful with WPBIP if you have any batch image import processes on your site. I use the background lib from delicious brains in EWWW Image Optimizer, and it has a rather large issue with dispatching the queue. It doesn't reset the $data variable after saving it to the db, so you can end up with something like this:
queue 1: 1
queue 2: 1,2
queue 3: 1,2,3
queue 4: 1,2,3,4
queue 5: 1,2,3,4,5
queue 10: 1,2,3,4,5,6,7,8,9,10
and so on. Import a couple hundred images, and you'll have a couple hundred queues with 1-200 items in them. There were some other issues with batch imports that I had to fix as well. You might be able to drop-in the background processing libs with the ones from EWWW IO: https://github.com/nosilver4u/ewww-image-optimizer/tree/master/vendor

This ticket was mentioned in Slack in #core-media by mike. View the logs.

7 months ago

This ticket was mentioned in Slack in #core-media by joemcgill. View the logs.

6 months ago

Note: See TracTickets for help on using tickets.