This script allows you to export layers in your Photoshop document as individual files at a speed much faster than the built-in script from Adobe.
This script does not try to achieve feature parity with the built-in script, but rather provide a more streamlined / performant experience. That being said, feel free to make feature requests, and feel free to contribute to it and make it even more powerful!
Table of Contents
- How to Use
- Example Screenshot
- Extra Field Documentation
- Batch Processing / Actions
- Feedback / Bugs
How to Use
Disclaimer: We are not associated with Adobe in any way. For any issues relating to Adobe products or Adobe scripts please contact them directly. We have never had an issue, but please use this script at your own risk. We are not responsible for any lost data or damaged PSDs so always make a back-up.
- Go to the releases page and download the most recent release.
- In Photoshop go to
File -> Scripts -> Browse...and select the
Export Layers To Files (Fast).jsxfile.
- NOTE: The script needs the
Export Layers To Files (Fast)-progress_bar.jsonfile to run as well. Without this you will get a "Progress bar resource corrupt" error. Please ensure that the
.jsonfiles are siblings in the same directory.
- NOTE: The script needs the
- You can add the script to the Scripts menu by adding all of the script files to
Photoshop > Presets > Scripts
/Program Files/Adobe/Adobe Photoshop VERSION/Presets/Scripts
/Applications/Adobe Photoshop VERSION/Presets/Scripts
Some of the features of the script include...
- Supported export formats:
- PNG (8 and 24 bit)
- Handles nesting in grouped layers
- Export either all layers or visible only
- Files are named either using layer names, layer + group names, or automatic layer indices
- Lowest layer can be treated as common background
- Exported images can have layer size or canvas size (trimming option)
- Last used dialog settings are remembered
- A selected group can be exported as usual (layer by layer) while everything else is left in tact. (This way variable content can be exported for complex fixed background and foreground.)
- Can export groups as folder hierarchy; conflicting folders are renamed
Extra Field Documentation
Will only export the selected group. Note that you must selected the group before launching the script, otherwise this option will be disabled. When you run the script this way, all other layers will be left untouched, meaning any visible layers on top or bottom may show in the export.
Ignore Layers Starting With
When this is selected, you can specify a prefix that will be used to match against layer names. Any matching layers will be ignored during the export.
For example, if you specify
x in the input, all layers starting with the letter
x will not be exported.
Use Custom Delimiter
Use Custom Delimiter will enable the use of a custom delimiter. Custom delimiters will be used instead of spaces in layer names and in the prefix/suffix fields. Note that the use of a space inside the file name is not supported by Photoshop, so by default a
- delimiter will be used if not custom delimiter is specified.
my layer 1 will export as
The following characters are not supported in the delimiter field:
Suffix will add a prefix and suffix, respectively, to every exported filename, and is compatible with all the options in Filenames above.
The following characters are not supported in the prefix or suffix field:
Prefix and Suffix fields can take the following string substitutes.
||Will be replaced with the index of the layer|
||Will be replaced with the index of the layer, with a leading zero|
||Will be replaced with the index of the layer, with up to two leading zeros|
||Will be replaced with the index of the layer, with up to three leading zeros|
||Will be replaced with the layer name. Useful for when exporting filenames as their index|
||Will be replaced with the document name|
||Will be replaced with the month|
||Will be replaced with the month, with a leading zero|
||Will be replaced with the date of the month|
||Will be replaced with the date of the month, with a leading zero|
||Will be replaced with the year, as the last two digits|
||Will be replaced with the year, as all four digits|
||Will be replaced with the hours, with a leading zero|
||Will be replaced with the minutes, with a leading zero|
||Will be replaced with the seconds, with a leading zero|
||Will be replaced with the milliseconds, with leading zeros|
- Currently we do not support multiple artboards for export
Batch Processing / Actions
Many people like to set up the script once, and then use batch processing or actions to automatically run the script.
To use the script this way, follow these instructions:
- Run the script, set your desired settings in the dialog and then hit "Save and Close"
- Open up the script file, in TextEdit (Mac), Notepad (Windows), or in a code IDE.
- At the top of the script, locate the code that reads
var BATCH_OPERATION = false;
- Change this to say
var BATCH_OPERATION = true;
- You can now rerun the script, and it will auto-run with the previous settings.
In order to make changes to the settings again, you'll need to change
BATCH_OPERATION back to
false and rerun the script.
We do our best to have the script be backwards compatible (back to Adobe Photoshop CS2) but are limited in what we can test for, both by Photoshop versions as well as OS. If you are encountering any issues with the current version, try downloading previous versions of the script instead.
Please feel free to contribute! We appreciate it!
Here are some things to know:
- When updating the dialog UI, please reference the
dev/dialog.jsand import it at https://scriptui.joonas.me/. Then, when you've made the appropriate UI changes, export the dialog and copy/paste the top comment block into the
dev/dialog.jsfile and copy/paste the remainder into the
Export Layers To Files (Fast).jsx.
- Be sure to test that any UI you add gets saved between script runs. i.e. If the user checks a checkbox, that checkbox should remain checked the next time they run the script.
Feedback / Bugs
Please use GitHub to write feedback/bugs/suggestions by filing an issue.
If you encounter a bug, please include the following information:
- Your OS and OS Version
- Your Photoshop version and release number
- A screenshot (if applicable)
.psdthat reproduces the issue (the simpler the better)