40

I posted this in 2018 here and it was marked as status-deferred. It's almost three years later and this is still an issue on Gardening and Landscaping and any site where photos are used to help answer questions

The real issue with image uploading that I see all the time on SE sites where users are not technically savvy is that the size limit of 2 MB is a barrier to asking questions. Most people use cell phones to take pictures and many cannot figure out how to reduce the resolution so the picture will not exceed the size limit.

Your image is too large to upload (over 2 MB).

Instead of showing a message that your picture could not be uploaded just show a message that your picture is being resized and automatically resize it.

3

1 Answer 1

28
+50

We've shipped automatic image resizing on image uploads over 2 MiB.

Any images over 2MiB will be allowed, but automatically resized below 2MiB so they load reasonably well for users

A couple implementation details / caveats:

  1. We still have a hard cap if the image is over 10MiB, whether by file upload or URL. We don't want to open up an attack vector with users submitting ultra large 5GB images to resize and hammer our servers. But most consumers images should easily fall under the 10MiB limit.
  2. Animated gifs are hard to re-size so still remain capped at 2MiB.
  3. Resizing is a best-effort solution here. If the resize ends up doing weird things to alpha transparency layer, compression, color mode, pixel sampling strategy etc, that's going to be hard to debug on an image by image basis. Users can always manually resize images down and upload those if they need explicit control over the resize characteristics, but this should be good enough to get photos from your phone onto the site.
  4. Sometimes you'll see images well below 2MiB. There's not a direct method call to resize down to an exact file size. We can resize the dimensions of an image, which serve as a good proxy for overall image size, but only once we save those with a particular image format, encoding, quality + exif metadata do we get the actual final size. Sometimes after a resize, we end up with a little more wiggle room below 2MiB than needed, but also helps prevent us from having to do multiple rounds of resizing to fit under our soft cap.

Happy Image Uploading!

1
  • 1
    So will the help files be updated to inform users of how to upload a photo and what will happen to their submission? I note that if you search help for "photo" or "picture" you get no results which may have been a source of frustration over the years. If help will not be updated then I can put a new request regarding that.
    – kevinskio
    Commented Jul 13 at 14:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .