Skip to main content
Participating Frequently
May 12, 2016
Question

Save For Web Image Size settings

  • May 12, 2016
  • 2 replies
  • 3833 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
Braniac
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.

JJMack
Braniac
May 12, 2016

nickc97991501 wrote:

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.

This sound like your interpolating images to different canvas sizes.  That your not trying to reduce files size using a lower quality setting and retain the image size.

Describe your exact manual process step by step and post your script.

JJMack