Search code examples
parse-platformimage-compressionparse-cloud-code

How to compress images and convert them into progressive images using cloud code?


I would like to run cloud code on save to use the uploaded large image(about 5mb) to generate a thumbnail(managed this using Parse Image module) and a compressed and progressive image of about 150kb which has not been possible by scaling the image using Parse Image module to like 1024px wide.


Solution

  • Best solution I came round to is to download the image, use jpegtran to scale down the images then with the progressive flag to make the images progressive.

    Once done upload the file back to parse.com