Skip to main content
Participating Frequently
August 9, 2019
Answered

What is the relation between "Quality" and "File Size".

  • August 9, 2019
  • 2 replies
  • 1162 views

Dear Photoshop Community, 

I'm trying to automate the export process in photoshop. I use always Save for Web because I need the images to be always under 100 Kb. and that needs manually editing every time, to choose the right quality. is there a formula or something that I can type in the Quality text box to achieve that? I know that there is a choice, to limit the size in the Save for Web menu, but it doesn't work with Actions.  For Example if the required quality for Image A is 80 to be Maximum 100 Kb. it will always stays 80 when I run the Action on another image, and the size will be over 100 Kb. 

Thank you very much in advanced, and have a great day!  

Mohamed

This topic has been closed for replies.
Correct answer Stephen Marsh

Okay, maybe I am not so smart get it, because I really can't. From my point of view, what I've done sounds like fixed steps for me.

File > Export > Save for web > optimized > File Size Optaim > Enter Size (fixed value) > Ok > Save > Save

the only reason that I could been satisfied with is, that Save for web window is a 3rd part extension for Photoshop, but it is not, or ?

Scripting as awesome, but its not for every one. I can understand codes, but I can't write them myself. and I really believe that Scripting is unnecessary for my case, because my work steps are Fixed steps.

what I can not understand is why Photoshop ignoring the file size that I have provided in the obtaining file size window.

and finally, thank you for your help and patience.

Best Regards

Mohamed


what I can not understand is why Photoshop ignoring the file size that I have provided in the obtaining file size window.

The simple answer is that Photoshop actions are not capable of recording this critical piece of information, your expectations are not unreasonable, however, actions can't record everything (just be thankful that you are not using Illustrator, where actions record a whole lot less than in Photoshop).

Even with scripting, there is no direct control to access the optimise to file size option... This is why there are very complex scripts that save a file, then check the file size on disk and repeat until the final file size is below the nominated target size.

2 replies

Stephen Marsh
Community Expert
Community Expert
August 9, 2019
Participating Frequently
August 12, 2019

Thank you very much! I will take detailed look at the scripts

JJMack
Community Expert
Community Expert
August 9, 2019

Save for web is used to save image files for use on the web in  browsers html pages.  Therefore it will not saved very large files they are not approbate  to be used in web pages. In fact save for web will not save images with huge canvas sizes. Save for Web also does not store an image resolution in saved files.  Print resolution is meaningless when it comes to the web. All that is Important is the number of pixels an image's width and height the image's canvas size.   Web image files types also use data compression so how well an image compresses depends one how much details is in an image.  A smooth well lit white wall has little detail and no texture where a field of grass has a lots color details and texture details. One image would compress very small the other will require much more data.  Image file size is important on the Web because they need to be transfers over the web which takes time. It can take a lot of time over a slow web connection web page display will be slow.   A detailed image file size can be reduced if you give up some detail to reduce the images file size for better performance over slow connections Quality and canvas size can be change via saver for web.  Save for web by default also strips image metadata to reduce file size.   Options are available to preserve some or all metadata.

In all cases Image content play a role in file size when data compression is involved.

JJMack
Participating Frequently
August 9, 2019

Thank you ver much for your reply, but im not sure if I'm supposed to find what im looking for in the answer.

let me please reform my question :

Is there any method to automate exporting images, with the highest Quilty available for a maximum defined size ?

Participant
August 9, 2019

yes use jpeg