Skip to main content
Inspiring
November 24, 2024
Open for Voting

Saving JPEGs Via an Action

  • November 24, 2024
  • 23 replies
  • 1321 views

I have an action that saves JPEG files. Basically, it changes to 8-bit mode, does a Save A Copy, choose file type JPEG and Saves the file. The first issue is that in PS 26.1, the folder to save to is always the same folder as that used when the action was created. I believe previously in earlier PS versions, it always brought up the most recently saved folder. If I am working in a specific folder, adjust an image as desired, save a PSD file, and then subsequently click my action to Save As JPEG, the folder where JPEG will be saved is always the same, which is very annoying because have to navigate to the current folder. You can imaging if I have multiple images to edit, this is bothersome because it takes extra time. This could be a bug that did not occur in 26.0 or previous versions. Secondly, I've asked for this before, but please change the code to always save to the same folder where the saved PSD file is located. I don't want to navigate to a different folder ever when saving a JPEG file, in an action, after having opened or saved the image to a PSD file. Navigating is unnecessary if the code were revised to do as I requested.

23 replies

D Fosse
Community Expert
Community Expert
November 24, 2024

Yeah, I just tested it and it doesn't work. Since you're saving to a different file format, it has to be Save As, not Save, and the path has to be specified.

Stephen Marsh
Community Expert
Community Expert
November 24, 2024

Actions always have recorded the full local computer path to the file. What is optional is to include or exclude the filename. File > Automate > Batch can override the action save as location, but if using the action outside of Batch then it uses the recorded path to the directory/folder used when recording the action. The other alternative is to insert the menu item into the action, rather than recording the path. If the path is recorded, then the modal control to the left of the action step can be activated to make the save step interactive.

D Fosse
Community Expert
Community Expert
November 24, 2024
  • In the action, include steps to make the file fully compliant with the jpeg specification (8 bit, flattened, no alpha channel*). Then you can use Save instead of Save A Copy.
  • When recording the action, make sure the file name and path are not highlighted and not recorded in the action. Just hit Save.
  • In PS preferences, make sure "Save to original folder" is checked.

 

I haven't tested this, but if this doesn't work nothing will. Then you need a script.

 

*to remove alpha channels, you need to call this very simple script, which can also be recorded as "insert menu item":

activeDocument.channels.removeAll();