[wp-trac] [WordPress Trac] #48522: Attachment size not generated when large images uploaded

WordPress Trac noreply at wordpress.org
Wed Nov 27 20:46:45 UTC 2019


#48522: Attachment size not generated when large images uploaded
-------------------------------------------------+-------------------------
 Reporter:  vanyukov                             |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  5.3.1
Component:  Media                                |     Version:  5.3
 Severity:  normal                               |  Resolution:
 Keywords:  2nd-opinion has-patch needs-testing  |     Focuses:
  needs-unit-tests                               |
-------------------------------------------------+-------------------------

Comment (by azaozz):

 Replying to [comment:17 vanyukov]:

 Looking at 48522.2.diff: the change there is to move creation of the
 scaled image to happen after the other sub-sizes were created. Don't think
 this fixes anything though. The logic is to do several attempts to post-
 process the image, and if all fail, to delete the attachment and the sub-
 sizes that were created. Then ask the user to scale the image and upload
 it again.

 If we move the creation of (presumably) the largest sub-size to last, and
 if it fails, we'll still need to delete the attachment and the rest of the
 sub-sizes. Otherwise some users will end up with inconsistently post-
 processed images.

 As far as I understand, the problem here is that ImageMagick (and probably
 GD) has a limit of how large a file can be processed (that depends on
 settings, etc.). Thinking that the best option when that limit is exceeded
 would be to "tell" the user to upload a smaller image.

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


More information about the wp-trac mailing list