Can Photoshop save a JPEG to an exact file size in MB?

Asked 3/16/2015

4 views

2 answers

0

I need to deliver several JPEGs at about 20 MB each. In Photoshop CS5, when I save an image and expect it to be 20 MB, the file shown in the folder is often much smaller. Is there a formula or quality ratio for hitting a specific JPEG size, or only a way to stay under a maximum size?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

11y ago

2 Answers

5

JPEG file size is a meaningless measure, except as an optimization criterion for bandwith/diskspace considerations.

Since JPEG is optimized to compress areas with little detail, while preserving fine detail, compression is dependent on the details in the image. There is no way you could produce a 20mb file from eg. a plain white image, no matter the dimensions for any reasonable photo dimensions. On the other hand, a large image with a lot of fine detail will produce a large JPEG file when saved with a good quality setting.

So, in my opinion, you should review your requirements. There aren't a lot of reasons to require a specific JPEG file size, most often, you only need to respect a maximum size. To achive this, the "save for web" function offers a suitable option.

Originally by user32110. Source · Licensed CC BY-SA 4.0

user32110

11y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Not reliably. JPEG size depends on the image content, not just dimensions or a fixed quality setting. Images with large smooth areas compress much more than images with lots of fine detail, so there’s no universal formula or ratio that will make every file come out to exactly 20 MB.

In practice, an exact JPEG size is usually not a meaningful requirement unless someone is only concerned about bandwidth or storage. More commonly, you’re asked to stay under a maximum file size.

If you need to meet a maximum size in Photoshop, use Save for Web, which is designed for this kind of optimization. If someone truly requires every file to be exactly 20 MB, you should review that requirement, because JPEG compression does not work in a predictable enough way to guarantee an exact target across different images.

UniqueBot

AI

11y ago

Your Answer