Photoshop: How to quick save as .JPG and overwrite a image with one click ?

  • 1
  • Question
  • Updated 2 years ago
  • (Edited)
I've tried a lot to do this using Actions and Scripts (That's something that really mess my mind yet).

I read this discussion on Adobe Foruns, but that's not clear for me yet:

One-click 'Save as jpeg' shortcut script please! - saved in the same folder

 

I am going to explain what I do in my job and what I need to automate this.

1- I OPEN A IMAGE

2- I EDIT AND CUT THE IMAGE

3- THEN I HIT CTRL+SHIFT+S TO SAVE AS .JPG

4-  I CLICK YES TO OVERWRITE THE IMAGE

5- AND IN JPG OPTIONS I INPUT THIS:

  Matte: None

  Quality: 12 (Maximum)

  Format Options: Progressive (Scans: 3)

6- THEN I CLOSE THE IMAGE AND CLICK TO NOT SAVE AS .PSD (BECAUSE SOMETIMES I REALLY DON'T NEED)

 

And that would be ok if I wouldn't open and edit like 200 images per day, I have to click several times to do this.

Would be a better way to automate this ? I guess by using scripts, I tried using actions but didn't work.

THANK YOU!

Photo of Rubens Gabriel

Rubens Gabriel

  • 2 Posts
  • 0 Reply Likes
  • Confused

Posted 2 years ago

  • 1
Photo of Paddy Boocock

Paddy Boocock

  • 7 Posts
  • 2 Reply Likes
Assuming you are using Photoshop CC2015.5 on a Mac

1. Close Photoshop if its running.

2. Open a text editor and copy and paste the text between the stars below into it. (Don't copy the stars).

*******************

// JavaScript Document

if (app.documents.length == 0) {

alert ("You must have an open document to run this script.");

}

else {

var docRef = app.activeDocument

var jpegOptions = new JPEGSaveOptions()

jpegOptions.quality = 12

jpegOptions.matte = MatteType.NONE

jpegOptions.formatOptions = FormatOptions.PROGRESSIVE

var saveName = docRef.fullName + ".jpg"

app.activeDocument.saveAs(new File(saveName), jpegOptions)

docRef.close(SaveOptions.DONOTSAVECHANGES)

}

*********************


3. Save the file to your disk with a meaningful name like "SaveasJPEGandClose.jsx". (Make sure you use the  extension .jsx and save it as a plain text file, not rich text).

4. Copy the file to the folder .

     Macintosh HD/Applications/Adobe Photoshop CC2015.5/Presets/Scripts

     (Replace MacIntosh HD above with your hard disk name if it's called something else)

     You'll need to provide admin authentication or use sudo with an administrator user password to do this.

5. Use Filer/Get Info or sudo to change the permissions for the file you copied above to Read/Write for yourself. (You'll need admin permissions to do this)

6. Open Photoshop

You should now have SaveasJPEGandClose listed under the menu File/Scripts

7. Open a file and check it does what you want

8. Open another file.

9. Open the Action Window and create a new action (click the little Document icon at the bottom of the Action Window) and do the following:

  • Give the action a name
  • Leave the action set as Default Actions
  • Set your desired shortcut key e.g. F7  + Shift + Cmd
  • Click record
  • Choose menu File/Scripts/SaveasJPEGandClose
10. Stop recording (click the Stop button at the bottom of the Action Window)

11. Close the Action Window

If you open another file and press F7+Shift+Cmd, then this should save it as a JPEG and then close it without changes.

The JPEGs will be saved in the same folder as the original files, with .jpg appended to the original name.

So if you had Documents/Myfile.ARW, it will be saved as Documents/Myfile.ARW.jpg

If you are using a layered file, e.g. PSD, to save then you'll need to flatten it before you run the action, or you'll get prompts about saving it.
(Edited)
Photo of Rubens Gabriel

Rubens Gabriel

  • 2 Posts
  • 0 Reply Likes
I get this error when I create the action and select the script.
I don't understand this.