1

I have a large number of PNG images that are organized in some specific directories and subdirectories, like this:

  • 0
    • 0
      • 0.png
  • 1
    • 0
      • 0.png
      • 1.png
    • 1
      • 0.png
      • 1.png

, etc.

The problem is, their filesize is too big. In order to reduce it, I've tried to create an Action for optimizing and saving the whole batch via Save for Web option.

First, I open the image which initial filesize is 256KB. Then I adjust the Save for Web window parameters, and the filesize it is indicating is 27.55KB.

From here, I've tried two different approaches:


1) Clicking Save... from the "Save for Web" window.

The final filesize here is 27.55KB, as promised, but the problem here is that saves the image to the directory I manually choose, there is no way to just overwrite the image. So when creating a batch action it outputs the images to the same directory and thus wrecks the whole folder organization.


2) Clicking Done in the "Save for Web" window, so it closes with the settings supposedly applied to the image.

Then I save the image the normal way (Ctrl +S), so it just overwrites the original image, and thus the file organization is kept the same, which is good.

The problem here is that the final filesize is 173KB instead of the "promised" 27.55KB. So I suppose that it's not the same clicking "Done" and then saving than directly saving from the "Save for Web" window.


How could I solve this? I am using Photoshop CS6

  • Hi Etherlind, welcome to GDSE and thanks for your question. If you want to know more about the site, please see the help center or ping one of us in the Graphic Design Chat once your reputation is sufficient (20). Keep contributing and enjoy the site! – Vincent Jul 19 '16 at 8:33
  • "...so it closes with the settings supposedly applied to the image" Sounds implausible to me. This merely closes the dialog window and does not affect how Ctrl+S works. – Kromster Jul 19 '16 at 12:24
  • @Kromster you're right. I tried opening my image and just saving it with overwrite, and the result is the same.The tooltip for the button "Done" is "Remember current settings and close dialog", though =/. – Etherlind Jul 19 '16 at 13:01
  • Tooltip probably refers to JUST THIS dialog, and does not affect anything outside it. – Kromster Jul 19 '16 at 13:04
1

You are misunderstanding how the Save for Web tool works.

Save for Web never affects your actual document or any output other than when you click the Save button from the Save for Web window. The Done button only saves the settings you apply so that you can come back to the Save for Web window and save from there. It doesn't affect a normal save.

As for a solution, I'm not sure it's possible to automate a Save for Web whilst overwriting or keeping your folder structure. You could probably write a script to do the Save for Web for you. Or use something other than Photoshop (such as ImageOptim).

There is a Photoshop extension here that looks like it may do what you need:

There are a few links to possible solutions here too:

  • Thanks! The "Image Processor Pro" plugin mentioned in both links is what I looked for. – Etherlind Jul 20 '16 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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