Active
Project:
Open Social
Version:
10.2.x-dev
Component:
Front-End
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Feb 2020 at 09:12 UTC
Updated:
4 Jun 2021 at 09:18 UTC
Jump to comment: Most recent
Problem
When adding an image to a topic page, you don't get any feedback when the dimensions of the image is too large. The result is no image shown at all. Next to the button 'choose file' you see the name of the file, but no image.
What you expect is feedback, like a red line and/or text showing the max possible size of the image
Solution
Provide inline feedback when uploaded image is too big
Comments
Comment #2
kingdutchThere's a long running Drupal core issue about this in #2583041: GD toolkit & operations should catch \Throwable to fail gracefully in case of errors. A possible user-land workaround in the meantime seems to be provided in #2977956: Recover from php/gd memory_limit exhausted (the ticket is for Drupal 7 but most of it should carry over).
Comment #3
kingdutchUpdated issue summary to clarify that this is about pixel size, not actual file size. The file size is already handled by other upload limits (and feedback should already be present). The error that's caused due to the pixel count results in the described behaviour of not having an error message (since the result terminates early).
The threshold (which is also seen in the linked Drupal 7 issue) is when
width * height * channels > PHP_MAX_MEMORY. Channels for most images is 3 (Red, Green and Blue) some formats may have 4 (Red, Green, Blue, Alpha).