Filename Generation

Save… suggests a name made from a filename format: text with tokens in braces, such as {name}-optimized. Set the format for an image in the sidebar's Filename (Pro), and the format new images start with in Settings → General.

How it works

The extension always follows the save format (.png, .webp or .avif), so it isn't part of the filename format.

{name}-optimized → photo-optimized.png (the default)

  • Case and spaces in a token don't matter. { NAME }, {Name} and {name} are the same token. Your format is kept exactly as you type it.
  • A token that doesn't apply is left out, along with one separator next to it: {name}-{quality} → photo.png (a PNG has no quality).
  • An unknown token stays as typed and is underlined in red in the field, so a typo is easy to spot: {name}-{colours} → photo-{colours}.png.
  • Characters a filename can't have (/ \ : * ? " < > |) become -.
  • Inserting tokens. Click Tokens under the field for the full list, or type { for suggestions (↑ and ↓ to choose, Return or Tab to insert). The ? beside the field opens this reference in the app.

Tokens

The examples use a sample image: photo.png, 1024 × 768 at 144 DPI, made with pngquant at 256 colors, saved at 9:05:07 AM on March 14, 2026.

Source

TokenWhat it isExample
{name}Source filename, without its extensionphoto
{srcext}Source's extensionpng
{srcsize}Source dimensions (W×H)1024x768

Output

TokenWhat it isExample
{format}png, webp or avifpng
{mode}lossless or lossy (WebP, AVIF)(empty here)
{size}Output dimensions, after trim and resize1024x768
{width}Output width1024
{height}Output height768
{scale}Resize %, empty at 100%(empty here)
{trim}"trimmed" when Trim is on(empty here)
{dpi}Kept DPI, empty when stripped or unknown144

Method

TokenWhat it isExample
{method}pngquant, posterize, blurizer, lossy or originalpngquant
{amount}The method's value: colors, levels or tolerance256
{colors}pngquant colors256
{levels}Posterize/Blurizer levels(empty here)
{tolerance}Lossy filter tolerance(empty here)
{quality}WebP/AVIF lossy quality(empty here)
{dither}Dither %, e.g. dither75; empty when offdither100
{speed}pngquant speed4
{minquality}pngquant minimum quality, empty when off(empty here)
{posterize}Posterize floor, e.g. rgb565; empty when off(empty here)
{effort}Compression effort: fast, better or bestfast

Time (when you press Save)

TokenWhat it isExample
{date}Save date: {ts:Y-m-d}2026-03-14
{time}Save time: {ts:Hi}0905
{datetime}Both: {ts:Y-m-d-Hi}2026-03-14-0905

For any other date or time layout, see Custom Timestamps.

Custom Timestamps

Use {ts:FORMAT} (or {timestamp:FORMAT}) with PHP date() codes for the time you press Save, in your computer's time zone.

  • The token's name ignores case and spaces, but the format after the colon is case-sensitive: m is the month and i the minutes.
  • Characters that aren't codes are kept as they are, and a backslash keeps a code letter as a letter (\W is a W).
  • {ts} alone is Unix seconds.

{name}-{ts:Y-m-d} → photo-2026-03-14.png

{name}-{ts:Y-m-d_His} → photo-2026-03-14_090507.png

{name}-{ts:D-j-M} → photo-Sat-14-Mar.png

{name}-{ts:Y-\WW} → photo-2026-W11.png (the ISO week, with a literal W before it)

{name}-{ts} → photo-1773479107.png

A colon in a filename shows as a slash in Finder and isn't allowed on Windows, so {ts:H:i} saves as 09-05.

Day

CodeWhat it isExample
dDay of the month, 2 digits (01–31)14
jDay of the month (1–31)14
DDay name, 3 letters (Mon)Sat
lDay name (Monday)Saturday
NDay of the week, ISO (1 = Monday … 7)6
wDay of the week (0 = Sunday … 6)6
SEnglish ordinal suffix (st, nd, rd, th)th
zDay of the year (0–365)72

Week

CodeWhat it isExample
WISO week number (01–53)11

Month

CodeWhat it isExample
mMonth, 2 digits (01–12)03
nMonth (1–12)3
MMonth name, 3 letters (Jan)Mar
FMonth name (January)March
tDays in the month (28–31)31

Year

CodeWhat it isExample
YYear, 4 digits (2026)2026
yYear, 2 digits (26)26
oISO week-numbering year2026
LLeap year (1 or 0)0

Time

CodeWhat it isExample
HHour, 24-hour, 2 digits (00–23)09
GHour, 24-hour (0–23)9
hHour, 12-hour, 2 digits (01–12)09
gHour, 12-hour (1–12)9
AAM or PMAM
aam or pmam
iMinutes (00–59)05
sSeconds (00–59)07
vMilliseconds (000–999)000
uMicroseconds (000000–999999)000000

Time zone

CodeWhat it isExample
eTime zone name (America/Louisville)
TTime zone abbreviation (EST)
POffset from UTC with a colon (-05:00)
OOffset from UTC (-0500)

Other

CodeWhat it isExample
UUnix seconds1773479107
\xA backslash shows the next character as is (\T → T)

This page as Markdown · all of the docs for agents in llms-full.txt