Skip to main content
Inspiring
January 2, 2025
Open for Voting

Scripts/Image Processor

  • January 2, 2025
  • 15 replies
  • 1137 views

Is there any chance that the option to convert a batch of images to WebP could be introduced into the Photoshop Scripts/Image processor, rather than having to write an action to do it please?

15 replies

NigelD1Author
Inspiring
January 11, 2025

A bit more homework on my part would have helped here. I ran your script and then incorporated an action which sharpens, changes to sRGB and uses File/Automate/Fit Image and I can just press one button and it works a treat - perfect. I hadn't used File/automate/Fit Image before despite being a PS user for nearly 20 years so you learn something every day. Really appreciate your guidance thank you.

Stephen Marsh
Community Expert
Community Expert
January 11, 2025
quote

One thing I could do is to just use the script for file type conversion and resize separately- two steps but it works. I appreciate your help thanks.


By @NigelD1

 

That's the whole idea of the script having an option to play an action. Anything that the script isn't designed to do, one might be able to put into the action that is run on each image. So hopefully no need for multiple steps.

 

There are conditional actions and orientation is an option, so you can have two different Image Size or Fit Image targets for each orientation in the action.

Stephen Marsh
Community Expert
Community Expert
January 11, 2025

@NigelD1 

 

I'm not even sure if File > Automate > Fit Image would work for you, it seems more about conditionally processing portrait vs. landscape orientation with different criteria.

 

For example, if I have a portrait orientation 5000 x 7000 px or landscape 7000 x 5000 px image and setup Fit Image to W: 1600 & H: 2400, both the portrait and landscape are resized to 1600 px wide. The landscape image is 1600 x 1143 px and the portrait is 1600 x 2240 px – the height of the portrait image isn't 2400 px as desired as the width was the overriding criteria.

NigelD1Author
Inspiring
January 11, 2025

One thing I could do is to just use the script for file type conversion and resize separately- two steps but it works. I appreciate your help thanks.

Stephen Marsh
Community Expert
Community Expert
January 11, 2025
quote

Thanks Stephen. I think I would probably need separate fields for width and height in order for me to enter appropriate figures to constrain the overall dimensions to 2400px x 1600px. Just having the long edge dimension means that I would get 2400px for the width of a portrait image whereas I'm looking for 1600px.


By @NigelD1

 

In the short term, I suggest you uncheck the tickbox in the script to fit the longest edge. As the script can reference an action, you can always record the File > Automate > Fit Image script into an action step and have the script play the action to your desired sizes.

NigelD1Author
Inspiring
January 10, 2025

Thanks Stephen. I think I would probably need separate fields for width and height in order for me to enter appropriate figures to constrain the overall dimensions to 2400px x 1600px. Just having the long edge dimension means that I would get 2400px for the width of a portrait image whereas I'm looking for 1600px. See PM.

Stephen Marsh
Community Expert
Community Expert
January 8, 2025

@NigelD1 – Thanks, I'll look into the fit feature as per your private message (the feature resizes the longest edge of each image to the specified value and proportionally resizes the shorter edge, there are no separate width and height fields).

.

NigelD1Author
Inspiring
January 8, 2025

Thanks Stephen, as per my message to you, the script downloaded straight away and ran as it was programmed to do. That will save me a load of time - thanks again.

Stephen Marsh
Community Expert
Community Expert
January 8, 2025

@NigelD1 

 

Thanks for the reply, feedback on the script is always appreciated, so please do post back and mark correct answers to update the topic.

NigelD1Author
Inspiring
January 8, 2025

Hi Stephen, I haven't had chance to do anything with it yet but will do. The urgency has been reduced because my contact is saying he will accept JPEGs. However, I'd still like to be able to convert. I may message you if I get into difficulties - thanks for your help.