Copy link to clipboard
Copied
Hi
im working with alot of files like ( 100 images per day) and i export them as a webp
it take a long time to export each one i need to press
file>save as a copy >webp>save
is there any way to make it faster or easier like a shortcut
or a plugin to let me save as a webp with one button?
Copy link to clipboard
Copied
in the future, to find the best place to post your message, use the list here, https://community.adobe.com/
p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post (like this one has already been moved) if it helps you get responses.
<"moved from using the community">
Copy link to clipboard
Copied
Actions and Scripts are the common forms of automation where keyboard shortcuts can be applied... That being said, more info would be required to offer more than generic advice.
General items for consideration (some may or may not apply to WebP)?:
* WebP compression - lossless or lossy. If lossy, what quality % value?
* WebP metadata, exclude or include? If include, XMP, EXIF and or Photoshop?
* Save As or Save a Copy?
* File name? Use the current file name or something else (prefix, suffix etc).
* Save location? Same as the original file or to a fixed/static location such as the desktop?
* Silently overwrite files with the same name/extension or prompt to overwrite?
* Convert to 8-bpc?
* Remove alpha channels?
* Convert non-RGB images to RGB?
* Convert non-sRGB images to sRGB or something else such as P1?
* Something else that I haven't considered?
Copy link to clipboard
Copied
WebP compression -lossy 100%
(WebP metadata, exclude or include? If include, XMP, EXIF and or Photoshop) NO
Save a Copy with any file name
Save location- Same as the original file
no overwrite i need to keep everthing
Convert to 8-bpc- no
Remove alpha channels - no
Convert non-RGB images to RGB - no
Convert non-sRGB images to sRGB or something else such as P1 - no
Something else that I haven't considered -no
Copy link to clipboard
Copied
Hi
You could :
Copy link to clipboard
Copied
As you want to have the ability to manually name files and handle overwriting files of the same name, the easiest way is to use a script which uses the native Save a Copy interface, defaulting to use the active document path. This means that the WebP option window will pop up every time as that is part of the Save a Copy process, just as the Save a Copy dialog that you need for file naming flexibility is also a part of the same process.
If you don't wish to have the WebP options dialog come up, then a modification of the script would be required to disable the native dialog and add a prompt for providing a filename.
/*
Save A Copy as WebP.jsx
v1.0 - 19th December 2023, Stephen Marsh
v1.0B - 10th February 2024 - Added a check for RGB mode, otherwise the save would silently fail
https://community.adobe.com/t5/photoshop-ecosystem-discussions/fastest-way-to-exporting-as-webp-in-photoshop/m-p/14304703
*/
#target photoshop
(function () {
// Ensure that version 2022 or later is being used
var versionNumber = app.version.split(".");
var versionCheck = parseInt(versionNumber);
// Fail
if (versionCheck < 23) {
alert("You must use Photoshop 2022 or later to save using native WebP format...");
// Pass
} else {
// Fail
if (activeDocument.mode !== DocumentMode.RGB) {
alert("The current document mode isn't RGB!");
// Pass
} else {
try {
var outputPath = activeDocument.path.fsName;
} catch (e) {
var outputPath = Folder.selectDialog("Unsaved file, select the output folder:");
}
var WebPDocName = activeDocument.name.replace(/\.[^\.]+$/, '');
saveWebP(100, false, false, false, new File(outputPath + "/" + WebPDocName + ".webp"), true, true);
app.beep();
}
}
function saveWebP(quality, includeXMPData, includeEXIFData, includePsExtras, saveTo, copy, lowerCase) {
function s2t(s) {
return app.stringIDToTypeID(s);
}
var descriptor = new ActionDescriptor();
var descriptor2 = new ActionDescriptor();
descriptor2.putEnumerated(s2t("compression"), s2t("WebPCompression"), s2t("compressionLossy"));
descriptor2.putInteger(s2t("quality"), quality);
descriptor2.putBoolean(s2t("includeXMPData"), includeXMPData);
descriptor2.putBoolean(s2t("includeEXIFData"), includeEXIFData);
descriptor2.putBoolean(s2t("includePsExtras"), includePsExtras);
descriptor.putObject(s2t("as"), s2t("WebPFormat"), descriptor2);
descriptor.putPath(s2t("in"), saveTo);
descriptor.putBoolean(s2t("copy"), copy);
descriptor.putBoolean(s2t("lowerCase"), lowerCase);
descriptor.putEnumerated(s2t("saveStage"), s2t("saveStageType"), s2t("saveSucceeded"));
executeAction(s2t("save"), descriptor, DialogModes.ALL);
}
}());
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
Copy link to clipboard
Copied
This 1.2 version does not offer the WebP options dialog, however, it does offer a prompt for providing a filename. This should remove one step.
/*
Save A Copy as WebP.jsx
v1.1 - 19th December 2023, Stephen Marsh
v1.2 - 10th February 2024 - Added a check for RGB mode, otherwise the save would silently fail
https://community.adobe.com/t5/photoshop-ecosystem-discussions/fastest-way-to-exporting-as-webp-in-photoshop/m-p/14304703
*/
#target photoshop
(function () {
// Ensure that version 2022 or later is being used
var versionNumber = app.version.split(".");
var versionCheck = parseInt(versionNumber);
// Fail
if (versionCheck < 23) {
alert("You must use Photoshop 2022 or later to save using native WebP format...");
// Pass
} else {
// Fail
if (activeDocument.mode !== DocumentMode.RGB) {
alert("The current document mode isn't RGB!");
// Pass
} else {
try {
var outputPath = activeDocument.path.fsName;
} catch (e) {
var outputPath = Folder.selectDialog("Unsaved file, select the output folder:");
}
var docName = activeDocument.name.replace(/\.[^\.]+$/, '');
var docNameInput = prompt('Enter a filename (without extension):', docName);
var WebPDocName = docNameInput.replace(/\.[^\.]+$/, '');
var saveFileWebP = new File(outputPath + "/" + WebPDocName + ".webp");
if (saveFileWebP.exists) {
if (!confirm("File exists, overwrite: Yes or No?", true))
throw null;
}
saveWebP(100, false, false, false, new File(saveFileWebP), true, true);
app.beep();
}
}
function saveWebP(quality, includeXMPData, includeEXIFData, includePsExtras, saveTo, copy, lowerCase) {
function s2t(s) {
return app.stringIDToTypeID(s);
}
var descriptor = new ActionDescriptor();
var descriptor2 = new ActionDescriptor();
descriptor2.putEnumerated(s2t("compression"), s2t("WebPCompression"), s2t("compressionLossy"));
descriptor2.putInteger(s2t("quality"), quality);
descriptor2.putBoolean(s2t("includeXMPData"), includeXMPData);
descriptor2.putBoolean(s2t("includeEXIFData"), includeEXIFData);
descriptor2.putBoolean(s2t("includePsExtras"), includePsExtras);
descriptor.putObject(s2t("as"), s2t("WebPFormat"), descriptor2);
descriptor.putPath(s2t("in"), saveTo);
descriptor.putBoolean(s2t("copy"), copy);
descriptor.putBoolean(s2t("lowerCase"), lowerCase);
descriptor.putEnumerated(s2t("saveStage"), s2t("saveStageType"), s2t("saveSucceeded"));
executeAction(s2t("save"), descriptor, DialogModes.NO);
}
}());
Copy link to clipboard
Copied
Find more inspiration, events, and resources on the new Adobe Community
Explore Now