Skip to main content
Sanpanza
Known Participant
September 23, 2023
Question

Batch Process images to WebP

  • September 23, 2023
  • 1 reply
  • 20138 views

How can I batch process hundreds of files to Webp format? I have been using PS for decades, and there is no native way that I can see of batch exporting images as Webp files.

 

I can do this in Lightroonas jpegs, but they are too large. Is there any way of batch converting 400 jpeg files to webp?

 

I tried batch processing for the first time after creating a "Save as Copy" script, but it made me go through each step manually and did not save time. Any thoughts on this matter would be greatly appreciated.  

1 reply

Stephen Marsh
Community Expert
Community Expert
September 23, 2023

Creating an action and using the batch command is the "standard native way", perhaps your action was set to "step by step" and not "accelerated" playback.

 

Anyway, I wrote a script for this:

 

Sanpanza
SanpanzaAuthor
Known Participant
September 24, 2023

OK, I did as you instructed:

 

Copied code into Mac text file set to txt and not rich text. 

Changed .txt extension to .jsx extension

I placed it into Adobe Photoshop 2024/Presets/Scripts

Tried to load the script because it does not show up in the image processor script menu.

But when I tried to load the script, it became a dead end. See examples. 

 

For some context, I know nothing about scripting or batch commands. I just need to get bunch of images into Webp format for my website.

 

Any thoughts?

 

 

Stephen Marsh
Community Expert
Community Expert
September 24, 2023

Please accept my gratitude, Stephen. This was of tremendous help to me, and if you lived in LA, I would buy you beer.

I have one last question. If I open the script and change the following two code lines  from 75 to 100, will it save at 100% ?

// Save as a copy and close
saveWebP("compressionLossy", 75, true, true, true, true);
activeDocument.close(SaveOptions.DONOTSAVECHANGES);

 

// Save as a copy and close
saveWebP("compressionLossy", 75, true, true, true, true);
activeDocument.close(SaveOptions.DONOTSAVECHANGES);

 

 


Changing from 75% lossy to 100% lossy, yes – not lossless.