My previous attempt at getting images into Eleventy didn't work out. I mean, it worked, but I wanted something different from what I'd built.
That package might be useful (eg if I wanted to publish all my cloud and sunset photos), but mostly I want to share a handful of photos like "Sandymount walk", which is a different use case.
Previous workflow:
- Put images into Immich, manage/organise them there (eg into an album)
- Get the album or media UUID out of Immich (manual step)
- Use an
ortag in my content
New workflow:
- Copy images into
./src/media/or directly to./public/media/(depends if I want to put the files in Git) - Run
npm run image:ingest <ingest-directory> <output-directory>(egnpm run image:ingest ./src/media/sandymount-walk ./src/photos/sandymount-walk, wheresrc/media/sandymount-walkis the directory containing the images, andsrc/photos/sandymount-walkis the generated markdown files) - Edit markdown content which is pre-filled with image tags
This is still pretty manual, but simplifies versus having content across disparate systems.
I generally echo '*' > src/media/<directory>/.gitignore and handle the media uploads with rsync, to keep the large files out of the repo.