We are using a macro that we then batch run to modify images. It works fine except for the element where we try and save the jpeg image in the best quality under 500 kb. This option used to exist under save to web (deprecated) then options (right top) and then save to fit file size (see image example below, sorry it's in Dutch, version 2015.1.2 20160113.r.355)

This is our batch/macro

  1. batch: take a input path and process all files also in subdirectories
  2. macro: trim all
  3. macro: resize all image, but only if the image is larger than 1200px (high)
  4. macro: save images to JPG (convert)
  5. macro: and save as the best quality jpeg fitting under 500k

All is working. Only I am having problems with the jpeg size/quality fitting function in step 5: it seems photoshop is not recognizing this as a 'step' in the macro.

question: How can I do the above for all image (bullet points) mainly step 5 where I try to save the best jpeg quality possible within a file size constraint (max 500kb)?

Even via a script or trick or tool. This last step is very important.

Any help appreciated

enter image description here

  • voting to close as off-topic since it's less about graphic design and more about how to work with batch / macro
    – Luciano
    Commented May 13, 2016 at 12:59
  • 1
    hence the corresponding tags
    – snh_nl
    Commented May 13, 2016 at 13:11
  • 1
    Use imagemagick.
    – joojaa
    Commented May 13, 2016 at 18:56

1 Answer 1


Use Lightroom where you can specify:

  1. Dimensions
  2. Resize if larger
  3. Save JPEG quality
  4. Save max file size

Will this work for your needs?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.