Skip to content
Photoshop retina script (jsx) - generates multiple images from 1 master
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Photoshop retina script (jsx) - generates multiple images from 1 master image

How to use

These scripts need to be imported in Photoshop to be used as a batch script.

How it works

We setup an array where we define the target image's prefix, suffix, width and height

So in this example, we generate 6 images.

// full headers
var pdp_imageSizes = [
["pdp","intro-desktop@2x","4000", "1480"],
["pdp","intro-desktop","2000", "740"],
["pdp","intro-tablet@2x","4000", "1480"],
["pdp","intro-tablet","2000", "740"],
["pdp","intro-phone@2x","1534", "840"],
["pdp","intro-phone","767", "420"]

The original filename will be used in the target filename as well.

So, consider we have an original file, PRODUCT.jpg, which is 3000x2000 pixels wide. (original image should always be as wide or higher than the largest image in your array). Also: put the array in an order so that largest images will be generated first.

The script will then generate 6 images:

pdp-PRODUCTNAME-intro-desktop@2x.jpg <br> pdp-PRODUCTNAME-intro-desktop.jpg
pdp-PRODUCTNAME-intro-tablet@2x.jpg <br> pdp-PRODUCTNAME-intro-tablet.jpg
pdp-PRODUCTNAME-intro-phone@2x.jpg <br> pdp-PRODUCTNAME-intro-phone.jpg

each with the size that was defined in the array.

If you have any more questions regarding useage, get in touch via

You can’t perform that action at this time.