How to reduce image sizes to upload to forum attachment

fearedbliss

Administrator
Staff member
Joined
Dec 19, 2021
Messages
1,352
Points
83
Hey all,

As you all know, the forum currently has a 2 MB limit on each attachment posted. This is primarily to keep the server storage requirements down since most of the images people will be uploading on the forums will be in-game screenshots which take around 300-500 KB. Although sometimes we want to upload other types of images, or desktop screenshots, etc, which could go up to even 5-6 MB+. For these situations, I recommend using ImageMagick to reduce the file size to 75% or lower, and/or strip out any additional image metadata that isn’t needed for these purposes.

You can download the Windows build of ImageMagick and run the following command:

Code:
magick mogrify -quality 65 <image file name>

Due note that the following command will do an in-place overwrite of the image, so make sure to back up the image first before doing the compression so that if you need to re-run the command with a different quality value, you could re-run the command on the original image.

- fearedbliss
 
I’ve increased the maximum file upload size limit from 2 MB to 20 MB. This should allow us to upload screenshots from most of the games we care about without any issues and without having to try and reduce the file size. If the server ends up getting way too many images taking up too much space, I’ll prune the images and remove the old ones. But for now we should be fine. You’ll just need to convert the image to a supported file type before you upload. You can follow this post for instructions on converting from bmp to jpg, but you should be able to use a similar strategy to convert to other types as well. You can also use an external image provider as well if you want to make sure your images are never pruned (by me, can still be pruned by them haha).
 
Back
Top