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

WordPress Trac noreply at wordpress.org
Tue Nov 26 22:39:56 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:  needs-patch 2nd-opinion  |     Focuses:
-------------------------------------+---------------------
Changes (by azaozz):

 * keywords:  reporter-feedback => needs-patch 2nd-opinion


Comment:

 Replying to [comment:14 vanyukov]:

 Thanks for moving the discussion here.

 > 1. Adjust the resample size
 > ...
 > My main concern is that this change might not be the best way to go
 forward without doing proper DSSIM tests to make sure that there is no
 visible change in images with the new resample size.

 Yeah, this is a possible solution but will need to ensure the image sub-
 sizes maintain best quality. This also seems the most complex of the
 three, and reducing the `$sample_factor` in a try/catch "loop" may be too
 "costly" in some cases.

 > 2. Error handle this.
 >
 > The problem with this approach - it does not fix the initial issue.
 There will still be no guaranteed way to resize large attachments.

 Right, there's no guarantee that a subsequent attempt to resize the image
 will succeed. On the other hand this is how "post processing" errors are
 generally handled now. If it fails, the client does another request and
 the post processing "picks up" from where the error occurred.

 Thinking this would be the best solution for 5.3.1. It is "safe" as it
 doesn't introduce more "failure points", and will fix at least some of the
 cases.

 > 3. Fallback to GD

 This is also a possible solution. The way it can be implemented would be
 to try ImageMagick first, and if it fails with specific error(s), proceed
 with GD. Generally ImageMagick is the preferred "editor" as it has more
 features, produces better quality image sub-sizes, and handles EXIF.

 @mikeschroder, @joemcgill any thoughts/suggestions/ideas? :)

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


More information about the wp-trac mailing list