Message not catched when uploading an image with megapixels higher than the ones permitted

Hi guys,

Not sure if someone has reported this before, but just in case. I’ve tried to upload a picture creating a new topic and clicking on Upload button, with the following data:

  • size: 8MB
  • pixels: 97

Having Discourse configured with the following settings:

  • max_image_size_kb: 4096
  • max_attachment_size_kb: 4096
  • max_image_megapixels: 40

After a while, I got the following non-human readable error:
image

Increasing both the size and the megapixels it works, no errors. I’ve tried with version v2.1.6 and v2.2.0.beta5.

Maybe this message should be a bit more friendly?

Cheers,
trobiyo

This looks like an error in the underlying ImageMagick C binaries, so my guess is it is specific to that image. This is extremely unlikely to be a Discourse bug based on what you posted.

Can you duplicate this on try.discourse.org? Where can I download the source image to test with?

3 Likes

Hi Jeff,

Please find below a link where to download the original image from onedrive (View original and then download it, to recover the original one):

I’ve tried in try.discourse.org and seems to work, but I dunno what are the settings set related to the size and the pixels.

Hope this helps!

Cheers
trobiyo

2 Likes

Took a while but it came across just fine on try.discourse.org when I allowed large enough images.

So the problem is specific to your local install of Discourse, it is not a fault in the Discourse docker image or codebase.

1 Like