Gallery Image Upload (February 2026)
Documentation of the bulk image upload from Google Drive to Strapi.
Source: Google Drive
Images shared via Google Drive at Ljósmyndir/.
| Folder | Files | Uploaded |
|---|---|---|
Myndefni -Átak 2024-2025/Frikkinn 2024/ | 74 JPG | Yes |
Myndir 2025-2025/Frikkinn 2025/ | 232 JPG (116 color + 116 B&W) | 116 color only |
Myndefni -Átak 2024-2025/Hjálpum þeim -Iðnó/ | 151 JPG (76 color + 75 B&W) | 76 color only |
Myndefni -Átak 2024-2025/Hjálpum þeim- fylgimyndir með frétt/ | 6 JPG | Yes |
Myndefni -Átak 2024-2025/*.jpg (loose files, TAKK group photos) | 6 JPG | Yes |
Myndefni -Átak 2024-2025/Covermynd-hjálpum þeim/ | 1 file (0 bytes) | Skipped — empty file |
Myndefni -Átak 2024-2025/Reels/ | 2 .mov videos | Skipped — not images |
B&W duplicates
Frikkinn 2025 and Hjálpum þeim Iðnó contained paired color/B&W versions of each photo. Even-numbered source files (Mynd-2.jpg, Mynd-4.jpg, ...) were B&W duplicates. These were identified by saturation analysis (ImageMagick HSL colorspace, mean saturation = 0 for grayscale) and removed, keeping only the color versions. 191 B&W images removed in total.
Galleries in Strapi
| Gallery | Slug | Images | DB IDs (draft/published) |
|---|---|---|---|
| Frikkinn 2024 | frikkinn-2024 | 74 | 21 / 22 |
| Frikkinn 2025 | frikkinn-2025 | 116 | 13 / 14 |
| Hjálpum þeim - Iðnó | hjalpum-theim-idno | 76 | 15 / 16 |
| Hjálpum þeim - fréttamyndir | hjalpum-theim-frett | 6 | 17 / 18 |
| TAKK hópmyndir | takk-hopmyndir | 6 | 19 / 20 |
| Total | 278 |
Technical details
Image processing
- Download:
rclonefromgdrive,shared_with_me:Ljósmyndir/to~/tmp/atak-images-raw/ - Resize: ImageMagick 7 (
magick) with parallel Python script (8 workers) - Variants (Strapi convention):
- Original: max 2000px wide
large: max 1000px widemedium: max 750px widesmall: max 500px widethumbnail: max 245px wide
- Quality: JPEG 85%, EXIF stripped (
-strip) - Total output: 278 images × 5 variants = 1,390 files, ~170 MB
GCS upload
- Bucket:
gs://okkar-vefur-strapi-uploads/ - Path convention:
{hash}/{hash}.jpgfor originals,{size}_{hash}/{size}_{hash}.jpgfor variants - Upload command:
gsutil -m cp
Database records
- files table: 278 records (IDs 47–120 for Frikkinn 2024, remaining in 121+ range)
- files_related_mph: 278 images × 2 (draft + published) = 556 image relations, plus 10 cover image relations
- Strapi 5 pattern: Each gallery has a draft row (
published_at = NULL) and a published row sharing the samedocument_id
Alt text
AI-generated Icelandic alt text descriptions, one per image. Stored in alternativeText field on each file record. Templates varied by collection theme (award ceremony, stage performance, group photos, etc.).
Scripts used
All scripts stored in ~/tmp/ during processing (not committed):
| Script | Purpose |
|---|---|
atak-resize-parallel.py | Parallel image resize (8 workers), outputs metadata JSON |
atak-process-images.py | Alt text generation, SQL generation |
atak-remove-bw.py | B&W duplicate identification and removal SQL/GCS script |
atak-images-metadata.json | Metadata for all images (hash, dimensions, variants) |
atak-images-alt.json | Alt text for all images |
atak-images.sql | Initial SQL (469 files, galleries, relations) |
atak-remove-bw.sql | B&W removal SQL (191 files) |
atak-fix-frikkinn2024-v2.sql | Frikkinn 2024 gallery recreation |
Frontend fix
GraphQL query in next/src/app/myndasafn/[slug]/page.gql.ts needed explicit pagination: { limit: 300 } because Strapi defaults to 100 items per relation. Fixed in PR #30.