Allow images higher than 100 megapixels

Is there any reason why the admin panel limits image sizes to 100 megapixels? I have a 110 megapixel image I want to post on my Discourse install (8858x12402) but I can’t because I can’t raise the megapixel limit to 110.

Can this ceiling be removed?

This was added as a mitigation against a denial-of-service attack in which extremely large (in dimension) but very compressible (so the file is small) images can be uploaded to cause the image processor to lose its tiny mind trying to resize the behemoth image for display. I’ll leave it up to @zogstrip to decide whether the ceiling limit can be raised without leaving a big hole.

4 Likes

That makes sense, though from a site admin perspective, I should be able to at least disable that if I want to. Images like this (sfw, but rest of site is not) for example are huge but they’re legitimately good images and may be nice if your goal is to post very high resolution art.

I guess bumping the upper limit to 150MB is fine.

https://github.com/discourse/discourse/commit/2d9b31b147498de38be10dc0b65678d28ddad95b

6 Likes