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

WordPress Trac noreply at wordpress.org
Thu Nov 28 18:50:50 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:20 vanyukov]:
 > Won't that seriously limit the capabilities of hosts that are not able
 to accommodate the heavy lifting of ImageMagick? With the patch, I'm
 getting no (sub-size) images at all and am required to downsize the
 original. What if that's not an option?

 Sure, but what are the alternatives? When an image to too big to be post-
 processed generally there are three possibilities:

 - Attempt to create as many sub-sizes as possible and leave the attachment
 inconsistent. In this case there may be from 0 to 6 sub-sizes (by
 default). This will cause many problems down the line, as ''everything''
 (WP, themes, plugins) expects to have at least the default sub-sizes
 available.

 - Attempt to (dynamically) adjust quality settings when creating sub-
 sizes. This will make larger images work, but will still fail for very
 large images. Also the quality of the sub-sizes will be inconsistent and
 may get pretty bad in some cases.

 - Fail the upload and ask the user to upload a smaller image that is more
 suitable for web use.

 As WordPress is a web publishing software, thinking that the third option
 above is best for the great majority of users. Of course there may be
 cases where images are not uploaded for "web use", but these cases would
 be best served by more specifically targeted plugins?

 > I can see so many scenarios that would make me want to upload
 attachments as large as possible. I'm fine with a host not being able to
 generate the largest attachment sizes. That's my concern. But I don't want
 WordPress to make that decision for me.

 Yeah, I understand. But that would be a specific use case. Most users
 upload images that are for "web use". They expect the images "to just
 work". Failing to create some of the sub-sizes will prevent these images
 from working properly.

 Also it is pretty simple to change (or disable) the creation of image sub-
 sizes from a theme or a plugin. Specific use cases are best handled by
 plugins, they shouldn't limit the main functionality in WP :)

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


More information about the wp-trac mailing list