Syntax
Learn how to find complete layer-naming syntax rules for generating image assets with custom quality, format, and size parameters in Adobe Photoshop on desktop.
The layer-naming syntax controls output format, quality, dimensions, and scaling for assets automatically generated from your PSD layers and layer groups. Understanding these syntax rules lets you create multiple asset variations from a single layer by encoding all parameters directly in the layer name.
Format-specific quality parameters
JPEG syntax
Quality suffix
- .jpg1 through .jpg10 (1–10 scale)
- .jpg1% through .jpg100% (percentage scale)
Default: 90% quality when no suffix is specified
Examples
- Logo.jpg5 — JPEG at quality level 5
- Hero.jpg80% — JPEG at 80% quality
- Banner.jpg — JPEG at default 90% quality
PNG syntax
Bit-depth suffix
- .png8 - 8-bit PNG
- .png24 - 24-bit PNG
- .png32 - 32-bit PNG
Default: 32-bit when no suffix is specified
Examples
- Icon.png8 - 8-bit PNG with 256 colors
- Photo.png24 - 24-bit PNG without transparency
- Button.png32 - 32-bit PNG with full alpha channel
- Logo.png - 32-bit PNG (default)
GIF syntax
Format
- .gif - basic alpha transparency
Quality parameter: Not available for GIF format
Example
- Animation.gif — GIF with basic transparency
SVG syntax
Format
- .svg - vector format
Quality and size parameters: Not applicable
Example
- Shape.svg - scalable vector graphic
Size and scaling parameters
Size prefixes appear before the asset name, separated by a space. If specifying dimensions in pixels, you may omit the unit.
Relative scaling
Syntax:[percentage]% [asset-name]
Examples:
- 200% Logo.jpg — scaled to 200%
- 50% Icon.png — scaled to 50%
- 42% Button.gif — scaled to 42%
Absolute dimensions
Syntax:[width] x [height] [asset-name] or [width][unit] x [height][unit] [asset-name]
Supported units: px, in, cm, mm (pixels may be omitted)
Examples:
- 300 x 200 Hero.jpg - 300px × 200px
- 100x100 Thumb.png - 100px × 100px (no spaces)
- 4in x 3in Photo.jpg - 4 inches × 3 inches
- 10cm x 5cm Card.png - 10cm × 5cm
Mixed units
You can combine different units in width and height specifications.
Examples
- 4in x 100 Banner.jpg - 4 inches wide, 100px tall
- 200mm x 6in Poster.png - 200mm wide, 6 inches tall
- 10in x 50cm Flyer.jpg - 10 inches wide, 50cm tall
Wildcard dimensions
Use ? as a wildcard to scale proportionally while specifying only one dimension.
Syntax:
- [width]x? [asset-name] — specify width, height scales proportionally
- ?x[height] [asset-name] — specify height, width scales proportionally
Examples:
- 100x? Logo.png — 100px wide, height auto-calculated
- ?x60in Banner.jpg — 60 inches tall, width auto-calculated
Multiple assets from one layer
Generate multiple asset variations by separating asset names with commas or plus signs.
Separators:
- , — comma
- , — comma followed by space(s)
- + — plus sign
- + — plus sign followed by space(s)
Examples:
- Icon.png,Icon.jpg - PNG and JPEG versions
- 200% Logo.jpg, 100% Logo.jpg - two sizes
- Icon.png8 + Icon.png24 + Icon.jpg90% - three format variations
- 100x100 Thumb.jpg90%, 50x50 Thumb.jpg80% - two scaled versions
Complex layer naming examples
Combined syntax
The complete syntax can combine format, quality, and scaling parameters:
[size] [asset-name].[format][quality], [size] [asset-name].[format][quality]
Example: 120% Delicious.jpg, 42% Delicious.png24, 100x100 Delicious_2.jpg90%, 250% Delicious.gif
This generates four assets:
- Delicious.jpg - JPEG at default quality, scaled 120%
- Delicious.png - 24-bit PNG scaled 42%
- Delicious_2.jpg - 90% quality JPEG at absolute 100×100px
- Delicious.gif - GIF scaled 250%
Subfolder organization
Include a subfolder path before the asset name to organize output:
Syntax:[subfolder]/[asset-name].[format]
Examples:
- icons/Logo.png - saved in icons subfolder
- @2x/Hero.jpg - saved in @2x subfolder
- thumbnails/50% Photo.png - scaled 50% in thumbnails subfolder
Absolute scaling validation
Valid absolute scaling syntax
|
|
Description |
|
100x80 foo.png |
Simple absolute dimensions |
|
80 x 100px foo.png |
Spaces between dimensions |
|
4in x100 foo.png |
Mixed units and unitless |
|
90mm x120cm foo.png |
Different units |
|
100x? foo.png |
Wildcard height |
|
?x60in foo.png |
Wildcard width |
Invalid absolute scaling syntax
|
Syntax |
Issue |
|
100x100foo.png |
Missing space before filename |
|
80x100 60% foo.png |
Cannot mix absolute and relative scaling |
|
50% 80x100 foo.png |
Cannot mix relative and absolute scaling |
|
20in cm x50cm foo.png |
Multiple units on single dimension |
|
30nm x20 nano.png |
Invalid unit (nm not supported) |
Layer name restrictions
Unsupported characters:: (colon) and * (asterisk) cannot be used in layer names for asset generation.
Ignored strings: Any string without a file extension is ignored in multi-asset layer names. For example, in 100% Delicious, 42% Layer 1.png, the string 100% Delicious is ignored because it lacks a file extension.
Remember to include a space between size prefixes and the asset name. Without this space, Generator may not parse the syntax correctly.
Create stunning images with Photoshop
Edit, retouch, and transform photos with the industry-leading creative tools you know and love.