[wp-trac] [WordPress Trac] #47872: Try to create image sub-sizes again when uploading fails with a PHP fatal error

WordPress Trac noreply at wordpress.org
Thu Oct 24 13:15:11 UTC 2019


#47872: Try to create image sub-sizes again when uploading fails with a PHP fatal
error
-------------------------------------------------+-------------------------
 Reporter:  azaozz                               |       Owner:  azaozz
     Type:  enhancement                          |      Status:  closed
 Priority:  high                                 |   Milestone:  5.3
Component:  Upload                               |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch needs-testing has-         |     Focuses:
  screenshots close has-dev-note                 |
-------------------------------------------------+-------------------------

Comment (by GregLone):

 Hello :)

 Sure, this is our use case: optimize the images automatically once they
 are uploaded.

 We could do it after each thumbnail is created, but this is why we decided
 not to:
 Case 1, optimizing synchronously: each thumbnail is optimized in the same
 thread.
  - Upload will take more time, the user will have to wait more to be able
 to use the images.
  - You're sure to have a timeout.
 Case 2, optimizing asynchronously: each thumbnail is optimized in another
 thread.
  - If you have 10 thumbnails (+ full size), you will have 11 optimization
 requests launched approximately at the same time, and at the beginning,
 working while other thumbnails are generating. It's enough to freeze the
 web site.

 Currently we optimize the images asynchronously with a queue system after
 all thumbnails are created:
 - No timeouts.
 - No freezes, the images are optimized each one after the other.
 - No delay, the user can work with the uploaded images right away.

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


More information about the wp-trac mailing list