Skip to main content
Participant
November 27, 2019
Question

Save for web excluding file extension in output file

  • November 27, 2019
  • 9 replies
  • 3263 views

I'm using Photoshop 2020, newest update.

 

When saving for web (after choosing format, compression, etc.), the file name is selected, ready for me to either hit enter or type in a new name (all good so far). I type in the new name, and hit enter. The resulting file name is all good, but the extension is gone. Surely this is unexpected behaviour, an oversight? It can't be meant to be this way, that all files saved via "save for web" lack file extensions if you type in a new name? I'm annoyed.

 

As the screenshots below show, I have file extensions enabled in Finder.

https://imgur.com/a/5yevMOb

This topic has been closed for replies.

9 replies

mikey2222002
Participating Frequently
July 16, 2021

I'm not comfortable using the posted script. I looked at the directions and immediately got a headache. I also looked at the instructions for reporting a bug and my headache got worse. 

 

Has anyone found another option to fix this issue? It sounds lame, but having to type in the extension every time I save as or save for web is a big pain in the tukus. 

 

I'm running Big Sur 11.4

Stephen Marsh
Community Expert
Community Expert
July 16, 2021

@mikey2222002 wrote:

I'm not comfortable using the posted script. I looked at the directions and immediately got a headache.

 

It sounds lame, but having to type in the extension every time I save as or save for web is a big pain in the tukus. 

 

I'm running Big Sur 11.4


 

You will either need to upgrade or downgrade Photoshop to a version that works correctly with your Mac OS (or upgrade your OS and possibly Photoshop) – or use a script as a work-around.

 

The abbreviated shortcut instructions for saving and running scripts are:

  1. Copy the code text to the clipboard
  2. Open a new blank file in a plain-text editor (not word-processor)
  3. Paste the code in
  4. Save the text file as .txt
  5. Rename the text .txt to .jsx
  6. Browse to the .jsx file to run (File > Scripts > Browse) or install to the appropriate directory to have the script listed directly under the scripts menu:

 

Mac OS Example:

  • /Applications⁩/Adobe Photoshop CC 2019⁩/Presets⁩/Scripts
  • /Applications/Adobe Photoshop 2021/Presets/Scripts

Win OS Example:

  • C:\Program Files\Adobe\Adobe Photoshop CC 2018\Presets\Scripts
  • C:\Program Files\Adobe\Adobe Photoshop 2021\Presets\Scripts

 

 

Participant
June 16, 2022

The script isn't working. I followed all the instructions and the file extensions is still highlighted. Please advise. 

Participant
January 13, 2021

I'm having the same issues on Mojave using Photoshop 2021. Looking forward to a fix.

Stephen Marsh
Community Expert
Community Expert
January 13, 2021

Try the script workaround.

Participant
June 2, 2021

Could someone give me a breakdown on how to use this script (Where to put it?/copy and paste it somewhere?). I'm having this issue but I'm not super fluent in the back end stuff. Or have we figured out an easier way of doing this?

Stephen Marsh
Community Expert
Community Expert
August 28, 2020

The following script is a proof of concept/test to answer if a script will overcome the Catalina OS issue where the file extension is not included.

 

 

/* This script exports a Save for Web JPEG to a user selected-folder, replacing file name word spaces with hyphens */

#target photoshop

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

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

    // Conditional overwrite check
    if (saveFileJPEG.exists) {
        if (!confirm("File exists, overwrite: Yes or No?", true))
            throw alert("Script cancelled!");
    }

    SaveForWeb(saveFileJPEG);

    // JPEG S4W Options
    function SaveForWeb(saveFileJPEG) {
        var sfwOptions = new ExportOptionsSaveForWeb();
        sfwOptions.format = SaveDocumentType.JPEG;
        sfwOptions.includeProfile = true;
        sfwOptions.interlaced = 0;
        sfwOptions.optimized = true;
        sfwOptions.quality = 70;
        app.activeDocument.exportDocument(saveFileJPEG, ExportType.SAVEFORWEB, sfwOptions);
    }

    // alert('JPEG saved!');

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

 

 

 

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

 

Participant
December 21, 2020

I'm experiencing this too in Big Sur. Huge productivity killer. This is such a basic need, I can't believe it's gone. Manually typing in a .jpg extension on everything is a waste of time.

 

Adobe please fix ASAP!

Stephen Marsh
Community Expert
Community Expert
December 21, 2020

cambriacombusts you could try the script posted directly above your reply as a possible work-around. The script can be modified to suit your requirements.

 

This forum is mainly a user-to-user forum. Users can offer help in various ways, but obviously not help with changes to programming. To address Adobe directly with a bug report or feature request:

 

https://feedback.photoshop.com/topics/photoshop/5f5f2092785c1f1e6cc4086b

https://helpx.adobe.com/au/x-productkb/global/how-to-user-voice.html#IsAdobeSupportCommunityandUserVoicedifferent

 

 

Participant
August 27, 2020

Second this. Freaking annoying. Anyone have an update on this getting fixed? Workflow is in pain...

Stephen Marsh
Community Expert
Community Expert
August 28, 2020

I don't use Catalina, so I can't test.

 

Are you willing to try a script to see if this can work-around the issue?

 

If so, what specific save for web options would be useful to test?

Stephen Marsh
Community Expert
Community Expert
August 18, 2020

This has come up "hundreds of times" since Catalina was released, however, nobody has been willing to see if exporting via a script resolves this issue. People just wait and hope that each new release resolves the issue.

Participant
August 18, 2020

Just sticking my oar in as well, still not fixed in 21.2.1, bumping for attention!

Participant
April 22, 2020

Same issue too. It really slows down work flow.

Known Participant
June 19, 2020

Not fixed Version 21.2.0

Jeff Arola
Community Expert
Community Expert
November 29, 2019

That seems to be issue with Catalina.

Until it's fixed you'll have to remember to append the file extension manually.

 

https://feedback.photoshop.com/photoshop_family/topics/save-for-web-bugs-on-macos-10-15-catalina

Jeff Arola
Community Expert
Community Expert
November 28, 2019

What version of macOS are you using?

 

Is it Catalina?

Participant
November 28, 2019

I should have included that in my post, of course. I'm using Catalina.