• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
2

Option to Disable "Jpeg Options" Pop Up After Saving

Explorer ,
Sep 06, 2021 Sep 06, 2021

Copy link to clipboard

Copied

After I close/save a Jpeg, Photoshop displays a pop up labeled "Jpeg Options". I save the same way for all of my photos so it would be nice to be able to set a default, disable this pop up asking the same thing everytime, and and not have to click "OK" on 1000's of photos.

Idea No status
TOPICS
Windows

Views

2.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 14, 2022 Jan 14, 2022

Here is the script, let me know if there are any problems or issues. Use at your own risk.

 

/*
Custom JPEG Save As to Baseline Standard.jsx
https://community.adobe.com/t5/photoshop-ecosystem-ideas/option-to-disable-quot-jpeg-options-quot-pop-up-after-saving/idc-p/12662182#M12329
Stephen Marsh, 15th January 2022 - v1.1
Info: Uses a custom prompt interface to *SAVE A COPY* with quality level 10 standard/baseline JPEG to a user selected-folder
*/

#target photoshop

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

Votes

Translate

Translate
12 Comments
New Here ,
Jan 14, 2022 Jan 14, 2022

Copy link to clipboard

Copied

Completely agree, 100%. It would be so nice to just have an option to set your preferred JPG options and never have to touch them again unless desired. 

Votes

Translate

Translate

Report

Report
Community Expert ,
Jan 14, 2022 Jan 14, 2022

Copy link to clipboard

Copied

@lv shutter 

@defaultb0i85kbn1psp 

 

This is possible using a script. I'll post some code later as I just knocked up such a script the other day in a different topic.

Votes

Translate

Translate

Report

Report
Community Expert ,
Jan 14, 2022 Jan 14, 2022

Copy link to clipboard

Copied

Here is the script, let me know if there are any problems or issues. Use at your own risk.

 

/*
Custom JPEG Save As to Baseline Standard.jsx
https://community.adobe.com/t5/photoshop-ecosystem-ideas/option-to-disable-quot-jpeg-options-quot-pop-up-after-saving/idc-p/12662182#M12329
Stephen Marsh, 15th January 2022 - v1.1
Info: Uses a custom prompt interface to *SAVE A COPY* with quality level 10 standard/baseline JPEG to a user selected-folder
*/

#target photoshop

if (app.documents.length !== 0) {
	// Remove extension
	var docName = app.activeDocument.name.replace(/\.[^\.]+$/, '');
	var docNameInput = prompt('Enter a filename (without extension):', docName);
	// Remove extension
	var docNameOutput = docNameInput.replace(/\.[^\.]+$/, '');
	var docPath = Folder.selectDialog('Select a folder to save the JPEG image to...');

	// File Path & Naming
	var saveFileJPEG = new File(docPath + '/' + docNameOutput + '.jpg');

	if (saveFileJPEG.exists) {
		// true = 'No' as default active button
		if (!confirm("File exists, overwrite: Yes or No?", true))
			// throw alert("Script cancelled!");
			throw null;
	}

	jpegOptions(saveFileJPEG);

	// JPEG Options
	function jpegOptions(saveFileJPEG) {
		jpgSaveOptions = new JPEGSaveOptions();
		jpgSaveOptions.embedColorProfile = true;
		jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
		jpgSaveOptions.matte = MatteType.NONE;
		jpgSaveOptions.quality = 10;
		// Save a Copy
		activeDocument.saveAs(saveFileJPEG, jpgSaveOptions, true, Extension.LOWERCASE);
	}

	app.beep();
	// alert('JPEG saved!');

} else {
	alert('You must have a document open!');
}

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

Votes

Translate

Translate

Report

Report
New Here ,
Jan 14, 2022 Jan 14, 2022

Copy link to clipboard

Copied

This is awesome, Stephen. Thanks for putting it together. I'll let you know how it goes!

Votes

Translate

Translate

Report

Report
Community Expert ,
Jan 30, 2022 Jan 30, 2022

Copy link to clipboard

Copied

quote

This is awesome, Stephen. Thanks for putting it together. I'll let you know how it goes!

 

@defaultb0i85kbn1psp – so, how did the script go?

Votes

Translate

Translate

Report

Report
New Here ,
Mar 21, 2023 Mar 21, 2023

Copy link to clipboard

Copied

Hi, I downloaded the script and tried it out but I think I am missing something. Like in the original question I would love a script that automatically saves to the same location at max quality without having to confirm via the jpeg options popup. I have installed this script and in the script manager chose the Save Document trigger but I see that the script still opens the photoshop jpeg options popup and then once I close that it opens a further custom save as popup. Have I done something wrong or is that the correct functionality?

Votes

Translate

Translate

Report

Report
Community Expert ,
Mar 21, 2023 Mar 21, 2023

Copy link to clipboard

Copied

@julesbower wrote:

 

quote

Hi, I downloaded the script and tried it out but I think I am missing something. Like in the original question I would love a script that automatically saves to the same location at max quality without having to confirm via the jpeg options popup. I have installed this script and in the script manager chose the Save Document trigger but I see that the script still opens the photoshop jpeg options popup and then once I close that it opens a further custom save as popup. Have I done something wrong or is that the correct functionality?

 

For max quality change:

 

jpgSaveOptions.quality = 10;

 

to:

 

jpgSaveOptions.quality = 12;

 

However, the script was written with a different intent than what you require and wasn't intended for use with the Script Events Manager, I'll post new code...

 

Votes

Translate

Translate

Report

Report
Community Expert ,
Mar 21, 2023 Mar 21, 2023

Copy link to clipboard

Copied

The following script silently overwrites an existing JPG file without offering the format options dialog box.

 

It is easy to enable the option to confirm overwriting the file if needed, without changing the file options.

 

Don't use with non-JPG files as it will flatten/convert to 8bpc/remove alphas to force the file to meet the file format requirements without saving as a copy. Use at your own risk. Not intended for use with the Script Events Manager. Once installed, a custom keyboard shortcut can be applied.

 

/*
Overwrite JPEG Without Dialog.jsx
v1.1 - 22nd March 2023, Stephen Marsh
https://community.adobe.com/t5/photoshop-ecosystem-discussions/what-happened-to-closing-a-file-and-having-it-save-changes/td-p/13658507
Based on:
https://community.adobe.com/t5/photoshop-ecosystem-ideas/option-to-disable-quot-jpeg-options-quot-pop-up-after-saving/idc-p/12662182
https://community.adobe.com/t5/photoshop-ecosystem-discussions/how-to-bypass-quot-jpeg-options-quot-when-saving-jpg-files-under-photoshop-v23-1/m-p/12597240
*/

#target photoshop

if (documents.length) {

    // Add a conditional check for .jpg extension in the filename, not .jpeg!
    /* https://community.adobe.com/t5/photoshop-ecosystem-discussions/jpg-jpeg/m-p/12760785#U12762639 */
    if (/\.jpg$/i.test(activeDocument.name) === true) {
        // Move on, the extension is standard!
        try {
            // Use the previously saved directory path
            var docPath = activeDocument.path;
        } catch (e) {
            // If unsaved, prompt for the save path
            alert('Unsaved file, save the file manually!');
        }

        var docName = activeDocument.name;
        var saveFileJPEG = new File(docPath + '/' + docName);

        // The overwrite check isn't needed for this script, but the code is retained for reference purposes...
        /*
        // Prompt to overwrite existing file
        if (saveFileJPEG.exists) {
        	// true = 'No' as default active button
        	if (!confirm("File exists, overwrite: Yes or No?", true))
        		// throw alert("Script cancelled!");
        		throw null;
        }
        */

        // Esnsure the the file conforms to the JPEG specification
        activeDocument.bitsPerChannel = BitsPerChannelType.EIGHT;
        activeDocument.flatten();
        activeDocument.channels.removeAll();

        // Call the function to save the file
        jpegOptions(saveFileJPEG);

        // End of script
        // app.beep();
        // alert('JPEG saved!');

    } else if (/\.jpeg$/i.test(activeDocument.name) === true) {
        alert("This document uses a non-standard four character file extension of 'jpEg'..." + "\n" + "You will need to fix this yourself!");
    } else {
        alert("This script is only intended to be used with JPEG files!");
    }

} else {
    alert('You must have a document open!');
}


// JPEG save function
function jpegOptions(saveFileJPEG) {
    jpgSaveOptions = new JPEGSaveOptions();
    jpgSaveOptions.matte = MatteType.NONE;
    jpgSaveOptions.embedColorProfile = true;
    // STANDARDBASELINE | OPTIMIZEDBASELINE | PROGRESSIVE
    jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
    // Quality  0 low quality - 12 high quality
    jpgSaveOptions.quality = 10;
    // Only valid for Progressive: 3 - 5
    if (jpgSaveOptions.formatOptions == FormatOptions.PROGRESSIVE) {
        jpgSaveOptions.scans = 3;
    }
    // Save and overwrite the original
    activeDocument.saveAs(saveFileJPEG, jpgSaveOptions, false);
}

 

  1. Copy the code text to the clipboard
  2. Open a new blank file in a plain-text editor (not in a word processor)
  3. Paste the code in
  4. Save as a plain text format file – .txt
  5. Rename the saved file extension from .txt to .jsx
  6. Install or browse to the .jsx file to run (see below)
    https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html#Photoshop

 

Votes

Translate

Translate

Report

Report
New Here ,
Mar 22, 2023 Mar 22, 2023

Copy link to clipboard

Copied

Thank you Stephen! Your time and kindness providing this solution is immensley appreciated 🙂

Votes

Translate

Translate

Report

Report
Community Expert ,
Mar 22, 2023 Mar 22, 2023

Copy link to clipboard

Copied

@julesbower 

 

You're welcome, feedback is always appreciated and welcome, this is just my take, you may wish for additions or removal of certain features.

Votes

Translate

Translate

Report

Report
Community Beginner ,
Sep 21, 2023 Sep 21, 2023

Copy link to clipboard

Copied

A small change to make the script work with both JPEG and JPG extensions at the same time.

Need to change:

if (/\.jpg$/i.test(activeDocument.name) === true) {

 to:

if (/\.jpe?g$/i.test(activeDocument.name) === true) {

 

Votes

Translate

Translate

Report

Report
Community Expert ,
Sep 21, 2023 Sep 21, 2023

Copy link to clipboard

Copied

LATEST

@TRAVELARIUM 

 

With your suggested change to my code, files saved with a non-standard four-character .JPEG extension will now be saved with .JPG... So now there will be two files, with the new file having a three-character extension and the original four-character extension unchanged!

 

This could be coded around, but the whole point was to bring to the user's attention that the file used JPEG rather than JPG, which is a real issue. My coding wasn't intended to be circumvented, so I can't agree with your suggested modification.

Votes

Translate

Translate

Report

Report