[wp-trac] [WordPress Trac] #55289: Large image fails to create a `scaled` version and subsizes
WordPress Trac
noreply at wordpress.org
Wed Mar 2 18:43:25 UTC 2022
#55289: Large image fails to create a `scaled` version and subsizes
--------------------------+------------------------------
Reporter: mitogh | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 5.9.1
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by mitogh):
@adamsilverstein interesting I was not able to face any of those errors
and the image was uploaded, the problem was that the subsizes where not
created, my current size limit is 100MB tho, in my setup Imagemagick is
used to process the images.
Looking into more detail (specifically into the Imagemagick
implementation) looks like the problem is because it creates a larger
image 5 times larger actually than the uploaded image, which for larger
images like the one from this issue consumes large portion of memory.
- https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-
includes/class-wp-image-editor-imagick.php#L363
From my point of view, when a large image is uploaded or when the image is
bigger than the threshold there's no real need/benefit in resampling as
images are going to be created in smaller sizes instead.
I can explore a bit more for imagemagick, but just commenting that line of
code makes the rest of the subsizes work as expected. Maybe some
additional logic can be added in place to consider the scenario when the
resampling is not required.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55289#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list