Added Image Compression algorithm, all the images are compressed before uploading to spaces.
Algo Def:
Only jpg, png, and jpeg are compressible
png images are not much flexible for compression, so they are optimized with a white background and reduced the width to 800 pixels to reduce size.
jpg and jpeg images are best compressed to less than 200KB or the limit set by the user in Frappe s3 attachment doctype.
for jpg and jpeg images the images are first reduced to width 800 px while maintaining aspect ratio, and then the quality is reduced one by one till the image reaches less than the compression size limit or the image has attained the least possible compression size after this the image will lose readability.
Added Image Compression algorithm, all the images are compressed before uploading to spaces. Algo Def: