#59147 closed defect (bug) (invalid)
Big image incorrectly triggers for small image
Reported by: | p00ya | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
WordPress 6.3, PHP 7.4 (GCS runtime), 1536MB RAM, no big_image_size_threshold
filter.
Upload a small PNG image (from wp-admin/media-new.php
), for example the attached PNG that has dimensions 100x150. The PNG was created by taking a screenshot in macOS and then running pngcrush
on it (but I can reproduce without the pngcrush step too).
Encounter error:
The server cannot process the image. This can happen if the server is busy or does not have enough resources to complete the task. Uploading a smaller image may help. Suggested maximum size is 2560 pixels.
My understanding based on https://make.wordpress.org/core/2019/10/09/introducing-handling-of-big-images-in-wordpress-5-3/ is that the error should only occur if the height or the width is > 2560.
My instance is operating in a RAM-restricted environment (tested on GCS F4 with 1536MB), but this has been sufficient for the kinds of imagemagick processing WordPress invoked on earlier versions. I'm not sure when it stopped working, but could bisect, but it's somewhere between v5.8.3 and v6.2 based on my media library and upgrade history.
Attachments (1)
Change History (4)
#1
@
16 months ago
Looking at the code, I now think the error message is actually a red herring. The async-upload.php POST (upload-attachment action) returns a 500 and a generic "There has been a critical error on this website." response, which is then shown as the "The server cannot process the image." message.
I'm investigating the root cause, but the poor errors here (even with WP_DEBUG
on) make it hard to trace.
#2
@
16 months ago
- Resolution set to invalid
- Status changed from new to closed
Resolving as invalid - the root cause was an incompatibility between a plugin dependency and the PHP version that only manifested on uploads. The debugging was quite painful though - I may file a separate feature request for better default behaviour in WP_Fatal_Error_Handler when WP_DEBUG and friends are set.
small PNG image for repro