Can "Save for Web" be automated?

juledurjuledur Users Awaiting Email Confirmation Posts: 287 Major grins
edited February 28, 2008 in Finishing School
This question is regarding Photoshop CS2:

I have a project under way in which the files need to be resized and saved for web. There are about 300 that need to be redone because the compression was too large. I need to size each image 3 different ways, and with different file names to distinguish between them.

I'm wondering if there's a way to speed this up, or if I have to do them one by one.

Comments

  • gchappelgchappel Registered Users Posts: 120 Major grins
    edited February 27, 2008
    This is easy to do with actions. If you have never used actions here is a quick and dirty way, and others may hop in with cleaner code. If you know actions ignore from here on-. Make 3 folders, labelled so you know which is which. Open an image. Start to record a new action- 2nd button from right below actions. Everything you do now is "recorded." Resize the image as needed, with whatever sharpening etc you need. Save it to folder A. Go to your history pallete and go back to open- the first item in the history. Now resize the image again to the 2nd size needed, save in folder B- it will save it with the original file name automatically. Go to history palate, go back to step one- {open} and resize a 3rd time. Save this to folder C. Then hit close, do not save changes. Stop recording the action.
    Now set up a batch. Go under file, automate, batch. Set your action to play at the top of the batch dialog. Pick the source folder for your images. I don't think you need to set a destination folder. Push OK and away you go. If this doesn't work- and it will work in theory- let me know. I am not at my photoshop machine so I am going from memory. Just to be safe make a backup copy of your source folder just incase so you cannot injure the originals. Spend a little time playing with actions and batch mode- it is amazing what you can do! I am sure there are slicker ways to do this- but I often write an action on the fly- quick and dirty- use it once and erase it.
    Drop a line if this doesn't make sense.
    gary
  • juledurjuledur Users Awaiting Email Confirmation Posts: 287 Major grins
    edited February 27, 2008
    Thanks for the tip. The problem I'm experiencing, though, is with the batch command - using "Save for Web" instead of "Save as". Is there a way to control that?

    So far, I've worked out a way to do each size change with an action, and then save each individually with the "Save for Web" command. Faster, but not that fast.
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited February 27, 2008
    juledur wrote:
    This question is regarding Photoshop CS2:

    I have a project under way in which the files need to be resized and saved for web. There are about 300 that need to be redone because the compression was too large. I need to size each image 3 different ways, and with different file names to distinguish between them.

    I'm wondering if there's a way to speed this up, or if I have to do them one by one.

    Look at the Image Processor script that's included with CSx. It can do everything you need to do here on as many images as you want without having to create an action. I use it regularly from Bridge for generating JPEGs of particular dimensions and compression, but you can also use it from within CS.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • juledurjuledur Users Awaiting Email Confirmation Posts: 287 Major grins
    edited February 27, 2008
    Thank you! I've tried the image processor, and it didn't give an option for Save for Web, which confused me. Also, it didn't give me an option for renaming the files. Can you tell me where to go to get it to work right? I have Bridge, but I think I'd rather do it from CS2.
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited February 27, 2008
    juledur wrote:
    Thank you! I've tried the image processor, and it didn't give an option for Save for Web, which confused me. Also, it didn't give me an option for renaming the files. Can you tell me where to go to get it to work right? I have Bridge, but I think I'd rather do it from CS2.

    What else do you need from Save for Web that you can't get from the Image Processor?

    Image Processor lets you set the size of the image, JPEG compression level and file type. You can also specify an action that is to be run on each image if you want something else (I sometimes do sharpening). It doesn't do renaming at the same time, but you can do that afterwards.

    If you want to do everything from one operation, you're probably going to have to resort to programming of some kind (actions or scripting) so you can create a custom script that does exactly what you want all in one operation.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • juledurjuledur Users Awaiting Email Confirmation Posts: 287 Major grins
    edited February 27, 2008
    My understanding is that Save for Web uses a different type of compression than Save As does, so the images look cleaner with a smaller bit count.

    When I previously did the automated save with the image processor, my file sizes came out far bigger than we needed and were taking too long to upload. So, I was directed to use Save for Web instead.
  • claudermilkclaudermilk Registered Users Posts: 2,756 Major grins
    edited February 27, 2008
    I very much doubt that. From what I can see Save For Web does two things: one, it semi-automates the steps needed to convert to a web-friendly format (drop to 8-bit, go to sRGB, set compression), and two it strip out all metadata.

    Just set your action to issue these commands as needed and then you can automate it. I never use Save For Web mainly because I don't want it strupping out my carefully-added copyright information, so I have an action to run all my final operations and save a web-friendly JPEG.
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited February 27, 2008
    juledur wrote:
    My understanding is that Save for Web uses a different type of compression than Save As does, so the images look cleaner with a smaller bit count.

    When I previously did the automated save with the image processor, my file sizes came out far bigger than we needed and were taking too long to upload. So, I was directed to use Save for Web instead.

    There's no way Photoshop has a "more efficient" JPEG compression engine in Save for Web vs. another. If Save As is generating larger image files than you want, then you just need to adjust your settings. The only difference in results between Save for Web and Save As should be that Save for Web strips all metadata (e.g. EXIF, copyright info, keywords, etc...) which does result in some filesize savings. There are other ways to strip that info if you want. The metadata can be in the 5-20k range. If your resulting image is 200k, then the metadata size isn't that significant. If your image is 40k, then the metadata is a signficant percentage.

    You can use Save for Web if you want. You'll just have to figure out how to record your own action that uses it. I, personally use Image Processor and then separately rename or strip metadata if needed.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • juledurjuledur Users Awaiting Email Confirmation Posts: 287 Major grins
    edited February 27, 2008
    Thanks, everyone, for the responses. I've just tried again with the image processor, and wasn't getting nearly the same result as Save for Web. We're talking about a difference between 35K and 8K for the same 300x300 px image.

    Since our web designer is insisting on the smallest file sizes possible (this is for a retail site), I think I'll stick with the Save for Web method that he recommended.

    As far as the action commands go, I'll play with that some more.
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited February 27, 2008
    juledur wrote:
    Thanks, everyone, for the responses. I've just tried again with the image processor, and wasn't getting nearly the same result as Save for Web. We're talking about a difference between 35K and 8K for the same 300x300 px image.

    Since our web designer is insisting on the smallest file sizes possible (this is for a retail site), I think I'll stick with the Save for Web method that he recommended.

    As far as the action commands go, I'll play with that some more.

    That difference is probably the metadata that Save for Web strips out and Save As does not.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • sg_is_mesg_is_me Registered Users Posts: 19 Big grins
    edited February 28, 2008
    I've included Save for Web in my actions. Thing is, it has to be within the action, as opposed to being used after the action is completed. Just do your Save for Web before you stop recording the action, and it will work. You can even click the little square next to the action step to have the action pause for each image, so you can apply different settings to each one. If you don't click that box, the action'll simply save all the settings as you set them when you recorded. If you batch, you'll want to make sure that box is clear, so there's no interruption.

    Here's the caveat - Batching the action with Save for Web will try to save the file with the same name, in the same location as your original action recorded. The trick is, in the Batch dialog box, you need to set your destination location, and be sure to check "Override Save As" before running the batch.

    Hope this is clear, and that it helps.
  • claudermilkclaudermilk Registered Users Posts: 2,756 Major grins
    edited February 28, 2008
    jfriend wrote:
    That difference is probably the metadata that Save for Web strips out and Save As does not.

    It may also be the compression setting. Make sure that's the same.
Sign In or Register to comment.