0

I'm currently using a JS script that compresses an image based on dimensions and optimization percentage using HTML canvas (for example, setting max width to 2000px and 70% optimization with .toDataUrl). I've also seen methods in Python such as .save() with Pillow to do the same.

I'm wondering if there are ways out there for optimizing images based strictly file size. For example, compress an image down to 2MB, and not worrying about the dimensions at all?

David
  • 944
  • 1
  • 13
  • 20

0 Answers0