Folder layout (storage template)
Sort your photos into folders on disk with Frameleaf’s Folder layout Watch on YouTube
Want your originals on disk in tidy, readable folders? The Folder layout page (the storage template) arranges them the way you choose, such as one folder per year and day, or one folder per album, so they’re easy to browse and back up outside Frameleaf. By default Frameleaf stores each upload under a folder for its owner with a generated name. The template only changes where files sit on disk; your library in Frameleaf looks the same either way.
Find it in Settings, then Storage & originals, then Folder layout.
Where files go
Section titled “Where files go”| Template | Originals are stored in |
|---|---|
| Off (default) | upload/<account ID>/…, with generated names |
| On | library/<account ID or storage label>/<your template> |
Both folders are inside your UPLOAD_LOCATION. Each person’s folder uses their storage label if they have one, otherwise their account ID.
Backup and restore explains which folders hold what, and why your backups need both the database and the files either way.
Turn it on
Section titled “Turn it on”- Open Settings, then Storage & originals, then Folder layout.
- Turn on Sort originals into folders.
- Pick one of the four layouts: By year, then day (recommended), By year, then month, By year, then month name or By year. Each card shows a sample path. To write your own pattern, pick Custom….
- Read the preview sentence under the cards: “A photo you take on 15 June 2024 will be saved as:” followed by the path, such as
Photo library › admin › 2024 › 2024-06-15 › IMG_1234.jpg. The second folder is your own storage label, or your account ID if you have none; everyone else’s photos go in a folder named the same way. If the path gets long, a notice warns you that some computers can’t open it. - Select Review changes, then Save changes.
Under the preview, the page makes one promise: Copies are checked before the old file is removed. “When Frameleaf moves a photo to another drive, the old file stays until the new copy matches it exactly.” There’s no switch for this; it’s always on.
Under Advanced: custom pattern you’ll find Custom pattern, the template itself (storageTemplate.template). Choosing a layout above writes it for you. The page lists every tag by kind (When the photo was taken, File, Camera and Album), each with what it becomes for a sample photo, and has Example patterns. A tag the server doesn’t know is named in a warning, so a spelling mistake is caught before you save. The same tags are in the table below.
A new layout only applies to new uploads. Once it’s saved, the page says so: “The N photos and videos you already have stay where they are until you re-file them.” Select Re-file existing photos…, then confirm, to move them. It runs in the background and shows its progress on the same page. It’s careful with every file, as described in How files are moved. You can also start it from Settings, then Computers & background work, then Background work: choose Advanced, find Sort originals into folders (it’s folded away with the other tasks that have nothing to do until it runs), open it, then choose Start now. You can run it again whenever you change the layout, so you’re never stuck with one. Folders it empties under upload/ are removed as it goes.
The default template is:
{{y}}/{{y}}-{{MM}}-{{dd}}/{{filename}}which stores a photo taken on 31 December 2025 as 2025/2025-12-31/IMG_123.jpg.
Variables
Section titled “Variables”Date and time variables use the photo’s creation time, shown in the server’s time zone (TZ). If a photo’s date is wrong, fix it first with the Date & Time Doctor, so it’s filed under the right day.
| Kind | Variables |
|---|---|
| Year | {{y}} (2025), {{yy}} (25) |
| Month | {{M}}, {{MM}}, {{MMM}}, {{MMMM}} (12, 12, Dec, December) |
| Week | {{W}}, {{WW}} |
| Day | {{d}}, {{dd}} |
| Hour | {{h}}, {{hh}}, {{H}}, {{HH}} |
| Minute | {{m}}, {{mm}} |
| Second | {{s}}, {{ss}}, {{SSS}} |
| File name | {{filename}} (IMG_123), {{ext}} (jpg) |
| File type | {{filetype}} (IMG or VID), {{filetypefull}} (IMAGE or VIDEO) |
| Camera | {{make}}, {{model}}, {{lensModel}} |
| Album | {{album}}, {{album-startDate-x}}, {{album-endDate-x}}, where x is a date variable such as y or MM |
| Other | {{assetId}}, {{assetIdShort}} (last 12 characters of the ID) |
Extensions are always made lowercase. If two files would end up with the same name, a number is added so nothing is overwritten.
How files are moved
Section titled “How files are moved”Sorting photos into folders moves and renames the files on your drive. Some photo apps have lost files doing this. Frameleaf takes these care steps every time:
- A move never replaces another file. If a file is already at the new name, the photo being moved gets a name of its own (with a number added) and both files are kept.
- The old file stays until the new copy is checked. Every copy is compared with the original before the old file is removed, whether it’s a move within one drive or to another drive.
- An interrupted move finishes next time. If the server stops in the middle of a move, for example after a power cut, the next run finishes it. A photo that already sits at its new name keeps that name instead of getting a new number.
- When in doubt, both are kept. On a network share, an unclear error can leave it uncertain whether a move happened. Frameleaf then keeps the file at both names rather than risk removing the last one.
If a photo ever turns up in Damaged and missing files, its history includes each move as Put in its folder: “Moved to … The new copy was checked against the old one before the old one was removed.”
The same care applies when Frameleaf moves files for other reasons, such as putting a restored file in place, moving a file to the trash, or keeping a photo’s detail file.
Layouts
Section titled “Layouts”The page offers four layouts. Anything else is a Custom… pattern.
| Layout | Pattern | Example result |
|---|---|---|
| By year, then day (recommended) | {{y}}/{{y}}-{{MM}}-{{dd}}/{{filename}} |
2025/2025-12-31/IMG_123.jpg |
| By year, then month | {{y}}/{{MM}}/{{filename}} |
2025/12/IMG_123.jpg |
| By year, then month name | {{y}}/{{MMMM}}/{{filename}} |
2025/December/IMG_123.jpg |
| By year | {{y}}/{{filename}} |
2025/IMG_123.jpg |
Some custom patterns people use:
| Custom pattern | Result |
|---|---|
{{y}}/{{y}}-{{WW}}/{{filename}} |
One folder per week |
{{album}}/{{filename}} |
One folder per album |
{{make}}/{{model}}/{{lensModel}}/{{filename}} |
One folder per camera and lens |
{{y}}/{{y}}-{{MM}}-{{dd}}/{{assetId}} |
Named by asset ID instead of the original name |
Albums in the template
Section titled “Albums in the template”If a photo is in several albums, {{album}} uses the album that was created most recently.
Special characters in album names are turned into HTML entities by default, so & becomes &. To keep them as they are, use three braces: {{{album}}}.
To use album folders but still give photos outside any album a home, use {{#if album}}, {{else}} and {{/if}}. This stores album photos in the album’s folder and everything else in Other/<month>:
{{y}}/{{#if album}}{{album}}{{else}}Other/{{MM}}{{/if}}/{{filename}}And this files albums under the year the album starts:
{{#if album}}{{album-startDate-y}}/{{album}}{{else}}{{y}}/Other/{{MM}}{{/if}}/{{filename}}Things to know
Section titled “Things to know”- External libraries aren’t moved. The template only applies to files Frameleaf stores itself. Files in external libraries stay where they are.
- Live Photos stay together. The video part of a Live Photo is moved alongside its still.
- Storage labels don’t move files on their own. After changing someone’s label, run Sort originals into folders (or Re-file existing photos…).
- Folder view shows the result as a folder tree, which works well with a tidy template. Turn it on in Settings, then Your preferences, then Tools & sidebar, with Use in the Folders row.
- Identical files are stored once. A file that several photos share stays in place while any photo uses it, and every photo that uses it follows the file when it moves.
© 2026 Frameleaf Inc. All rights reserved.
Frameleaf and the Frameleaf logo are Trademarks of Frameleaf Inc.
