[wp-trac] [WordPress Trac] #40439: Save progress of intermediate image creation after upload

WordPress Trac noreply at wordpress.org
Sun Jun 24 08:47:44 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:  needs-patch   |     Focuses:
--------------------------+---------------------
Changes (by azaozz):

 * milestone:  Future Release => 5.0


Comment:

 This seems simple enough to implement: instead of generating all image
 sizes and saving them first, then updating the image_meta in the db, we
 should be updating the meta after each size is created. That way if a size
 creation fails for some reason, we will be able to re-run that loop and
 create any missing sizes (and add the meta for them).

 It's true, this will write to the db a few times more, but that is
 negligible overhead compared to timeouts of 30 seconds :)

 > The main downside is that `file_exists()` lookup times can add up

 True, but still negligible (compared with 30 sec. running). Also, not sure
 we should do `file_exists()` for each newly created sub-size. If the file
 was saved successfully, it does exist at that point :)

 Thinking we should try this now. After this is implemented we can think of
 a good UI/UX to expose the ability to regenerate image sizes when some are
 missing, see #43525.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/40439#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list