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.

JJMack
Community Expert
Community Expert
May 12, 2016

I appreciate the reply but I think it's veering off dramatically from what I'm asking. I know all about compression, JPEG etc.

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

So I need to know one thing.

SaveForWeb:

Image Size Percent:

Image Size Quality:

Can these be accessed / manipulated via script?


yes

I think you may want to download and install from the Web the Image Processor Pro Plug-in Script.  I believe it may be all you need to do what  you want to do...

http://www.adobe.com/content/dam/Adobe/en/devnet/photoshop/pdfs/photoshop-cc-javascript-ref.pdf

JJMack