Bulk import photos into image collections
Import multiple images at once from a folder.
Basic Import
astrolock import images gallery path/to/photos/
This:
- Copies images to
public/images/content/gallery/ - Creates content entries for each image
- Extracts EXIF data (if available)
Options
| Option | Description |
|---|---|
--recursive | Include subfolders |
--dry-run | Preview without making changes |
# Preview what would be imported
astrolock import images gallery ./photos --dry-run
# Import including subfolders
astrolock import images gallery ./photos --recursive
EXIF Extraction
If your images have EXIF data, it’s automatically extracted:
exif:
camera: "Canon EOS R5"
lens: "24-70mm f/2.8"
iso: 400
aperture: "f/8"
shutterSpeed: "1/250"
dateTaken: 2025-01-15
Info
EXIF data requires images with embedded metadata (usually from cameras, not screenshots).
Supported Formats
- JPEG/JPG
- PNG
- WebP
- AVIF
After Import
Review the generated content files to:
- Add titles and descriptions
- Organize into categories
- Set featured images