Setting 'imageForceResize' and 'imageQuality' options greatly increases file size in a certain situation

Author: guagCreated Feb 20, 2014Updated Dec 27, 2020
Labelsbrowser bug

I'm using the following options to compress & resize images on the client side:

imageForceResize: true disableImageResize: false imageQuality: 0.5 imageMaxWidth: xxxx imageMaxHeight: xxxx

This works perfectly for images that are above either the max width or max height. But for images that are under the max width/height requirements, this actually seems to make the file size bigger. For example, one image I tried increased in size from 2.5MB to over 3.5MB. For other images that were actually scaled down, sizes went from 5MB -> 700KB, etc.

So my question is, am I doing something wrong? Or is image compression (without changing the image dimensions) not supported?

Source: blueimp/jQuery-File-Upload