Skip to content

Commit 8e821ab

Browse files
author
Marc Geurts
committed
Updated Photo handling documentation
1 parent 14f24d3 commit 8e821ab

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

README-PHOTO-MIGRATION.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ php artisan photos:migrate [--dry-run]
2222
storage/app/public/
2323
├── photos/ (original size)
2424
└── {teamId}/
25-
── {personId}_{index}_{timestamp}.{ext}
25+
── {personId}_{index}_{timestamp}.{ext}
2626
├── photos-096/ (small size)
2727
└── {teamId}/
28-
── {personId}_{index}_{timestamp}.{ext}
28+
── {personId}_{index}_{timestamp}.{ext}
2929
└── photos-384/ (medium size)
3030
└── {teamId}/
31-
── {personId}_{index}_{timestamp}.{ext}
31+
── {personId}_{index}_{timestamp}.{ext}
3232
```
3333

3434
### To (New Structure)
@@ -38,8 +38,9 @@ storage/app/public/photos/
3838
└── {teamId}/
3939
└── {personId}/
4040
├── {personId}_{index}_{timestamp}.{ext} (original size)
41-
├── {personId}_{index}_{timestamp}_small.{ext} (small size)
42-
└── {personId}_{index}_{timestamp}_medium.{ext} (medium size)
41+
├── {personId}_{index}_{timestamp}_large.{ext} (large size)
42+
├── {personId}_{index}_{timestamp}_medium.{ext} (medium size)
43+
└── {personId}_{index}_{timestamp}_small.{ext} (small size)
4344
```
4445

4546
### Backup Structure (Created Automatically)
@@ -73,7 +74,7 @@ The command supports all common image file formats:
7374
5. **Extracts metadata** from the file path:
7475
- Team ID from the first directory level
7576
- Person ID from the filename (everything before the first underscore)
76-
6. **Renames files** by adding size suffixes (`_small`, `_medium`) for non-original images while preserving file extensions
77+
6. **Renames files** by adding size suffixes (`_large`, `_medium`, `_small`) for non-original images while preserving file extensions
7778
7. **Creates the new directory structure** (`photos/{teamId}/{personId}/`)
7879
8. **Copies files** to their new locations
7980
9. **Deletes original files** after successful copy

README-UPLOADS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ php artisan photos:migrate
2323
**What changed in version 4.5.0:**
2424

2525
- **Before 4.5.0**: Photos were stored in separate folders (`photos/`, `photos-096/`, `photos-384/`) with a flat `teamId/filename` structure
26-
- **From 4.5.0**: Photos are stored in a unified `photos/` folder with nested `teamId/personId/` structure
26+
- **From 4.5.0**: Photos are stored in a unified `photos/` folder with a nested `teamId/personId/` structure
2727

2828
**Migration features:**
2929

@@ -49,7 +49,8 @@ Uploaded photos are saved in the photos folder using the filename template:
4949
`personId_sequence_timestamp[_size].webp`
5050

5151
Example:
52-
552_001_20250815T073948.webp (original)
52+
552_001_20250815T073948.webp (original, untouched)
53+
552_001_20250815T073948_large.webp (large size, by default 1920 pixels wide)
5354
552_001_20250815T073948_medium.webp (medium size, by default 384 pixels wide)
5455
552_001_20250815T073948_small.webp (small size, by default 96 pixels wide)
5556

0 commit comments

Comments
 (0)