Skip to main content
Participating Frequently
May 12, 2016
Question

Save For Web Image Size settings

  • May 12, 2016
  • 2 replies
  • 3851 views

Hi folks,

This is currently driving me mad.

Is there any way of accessing the Image options in Save For Web via script????

I need to be able to manipulate the following:

Image Size Percent:

Image Size Quality:

I've looked everywhere, trawled through the api and can't find any information.

My workaround is to use an action to resize the image and then run a script to ExportOptionsSaveForWeb() but this always results in a larger file size and, for some unknown reason, an image that is 1px up and to the left.

I do not get this issue when running this same process manually with exactly the same settings.

Any help?

This topic has been closed for replies.

2 replies

Known Participant
August 10, 2016

IMO Photoshops' image compression tools aren't very good, maybe you can achieve something externally. I would recommend exporting as a high quality jpg (or png if you need transparency or are working with flat colors) at the exact resolution you need them to appear, then using a tool like https://tinypng.com/ or WP- smush. You'll end up with smaller images that look better than what photoshop can achieve.

JJMack
Community Expert
Community Expert
May 12, 2016

File size is not predictable. How well an image will compress depends on how much fine detail you have for an image   An image x pixels wide by y pixels high  saves as a high quality jpeg image can be as small as 200KB to as large as 7MB depends on image content.

JJMack
Participating Frequently
May 12, 2016

Hi JJMack,

For the images I'm working on we have a master image created from a manual export.

I localise these images x 50. If I export each 1x version manually it is always around the same size in bytes.

Trying to script this exact process I always end up with an image that's a large files size and has a slight deviation in layout.

The only thing that changes from using scripts and using the manual process is changing the image size to 50% in the Save For Web window and that appears to be messing things up hence why I want to know if this can be accessed using javascript to run some tests and hopefully export images of the same quality, layout and file size.

Participating Frequently
May 13, 2016

nickc97991501 wrote:

This is for a very specific website that requires very specific standards and requires even numbers for the 2x version.

You wrote the above an I believe every word.  However only you know the very specific standards.   That make it very hard for us to help you.  From seeing you script and reading what you wrote. I find it hard to believe with a few simple actions and the Image processor Pro Script that you can not do what you want.  If you have looked at Adobe documentation on Photoshop Java scripting you should have known all the script question you asked can be done.  I can understand you needing help but you seem not to want any.


No, I have looked through all the documentation for Photoshop scripting and the SaveForWeb function. It's not there.

It doesn't list the image size anywhere in that section. Now, maybe I thought I was missing something or maybe someone else had come across this same issue and worked it out. Maybe there is a hack or more probably this can't be done.

It's a simple question relating to two specific parts of the save for web function.

Can you script a 50% image reduction and set the Quality to bicubic as part of the ExportSettings SaveForWeb?

That is the help I need.

Cheers.