EXIF-based photo blog with built-in admin panel, Vercel Postgres as CMS, and Vercel Blob for image storage.
EXIF
Photo Bloghttps://github.com/sambecker/exif-photo-blog/assets/169298/4253ea54-558a-4358-8834-89943cfbafb4
NEXT_PUBLIC_SITE_TITLE
(e.g., My Photos)NEXT_PUBLIC_SITE_DOMAIN
(e.g., photos.domain.com)NEXT_PUBLIC_SITE_DESCRIPTION
(optional—mainly used for OG meta)AUTH_SECRET
ADMIN_EMAIL
ADMIN_PASSWORD
/admin
pnpm i
to install dependenciesAUTH_URL
locally (not in production) to http://localhost:3000/api/url
(this is a temporary limitation of next-auth
v5.0 Beta)vc dev
to start dev server with Vercel-stored environment variables@vercel/analytics
already included)@vercel/speed-insights
already included)⚠️ READ BEFORE PROCEEDING
Usage of this feature will result in fees from OpenAI. When enabling AI text generation, follow all recommended mitigations in order to avoid unexpected charges and attacks. Make sure your OpenAI secret key environment variable is not prefixed with NEXT_PUBLIC.
OPENAI_SECRET_KEY
AI_TEXT_AUTO_GENERATED_FIELDS = title, semantic
Application behavior can be changed by configuring the following environment variables:
NEXT_PUBLIC_PRO_MODE = 1
enables higher quality image storage for jpgs (will result in increased storage usage)NEXT_PUBLIC_BLUR_DISABLED = 1
prevents image blur data being stored and displayed (potentially useful for limiting Postgres usage)NEXT_PUBLIC_GEO_PRIVACY = 1
disables collection/display of location-based dataNEXT_PUBLIC_IGNORE_PRIORITY_ORDER = 1
prevents priority_order
field affecting photo orderNEXT_PUBLIC_PUBLIC_API = 1
enables public API available at /api
NEXT_PUBLIC_HIDE_REPO_LINK = 1
removes footer link to repoNEXT_PUBLIC_HIDE_FILM_SIMULATIONS = 1
prevents Fujifilm simulations showing up in /grid
sidebarNEXT_PUBLIC_HIDE_EXIF_DATA = 1
hides EXIF data in photo details and OG images (potentially useful for portfolios, which don't focus on photography)NEXT_PUBLIC_GRID_ASPECT_RATIO = 1.5
sets aspect ratio for grid tiles (defaults to 1
—setting to 0
removes the constraint)NEXT_PUBLIC_OG_TEXT_ALIGNMENT = BOTTOM
keeps OG image text bottom aligned (default is top)Only one storage adapter—Vercel Blob, Cloudflare R2, or AWS S3—can be used at a time. Ideally, this is configured before photos are uploaded (see Issue #34 for migration considerations). If you have multiple adapters, you can set one as preferred by storing "aws-s3," "cloudflare-r2," or "vercel-blob" in NEXT_PUBLIC_STORAGE_PREFERENCE
.
[{ "AllowedHeaders": ["*"], "AllowedMethods": [ "GET", "PUT" ], "AllowedOrigins": [ "http://localhost:3000", "https://{VERCEL_PROJECT_NAME}*.vercel.app", "{PRODUCTION_DOMAIN}" ] }]
NEXT_PUBLIC_CLOUDFLARE_R2_BUCKET
: bucket nameNEXT_PUBLIC_CLOUDFLARE_R2_ACCOUNT_ID
: account id (found on R2 overview page)NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_DOMAIN
: either "your-custom-domain.com" or "pub-jf90908...s0d9f8s0s9df.r2.dev" (do not include "https://" in your domain)NEXT_PUBLIC
):CLOUDFLARE_R2_ACCESS_KEY
CLOUDFLARE_R2_SECRET_ACCESS_KEY
[{ "AllowedHeaders": ["*"], "AllowedMethods": [ "GET", "PUT" ], "AllowedOrigins": [ "http://localhost:*", "https://{VERCEL_PROJECT_NAME}*.vercel.app", "{PRODUCTION_DOMAIN}" ], "ExposeHeaders": [] }]
NEXT_PUBLIC_AWS_S3_BUCKET
: bucket nameNEXT_PUBLIC_AWS_S3_REGION
: bucket region, e.g., "us-east-1"{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:PutObjectACL", "s3:GetObject", "s3:ListBucket", "s3:DeleteObject" ], "Resource": [ "arn:aws:s3:::{BUCKET_NAME}", "arn:aws:s3:::{BUCKET_NAME}/*" ] } ] }
NEXT_PUBLIC
):AWS_S3_ACCESS_KEY
AWS_S3_SECRET_ACCESS_KEY
My images/content have fallen out of sync with my database and/or my production site no longer matches local development. What do I do?Absent configuration, the default grid aspect ratio is
1
. It can be set to any number (for instance1.5
for 3:2 images) viaNEXT_PUBLIC_GRID_ASPECT_RATIO
or ignored entirely by setting to0
.
I'm seeing server-side runtime errors when loading a page after updating my fork. What do I do?Navigate to
/admin/configuration
and click "Clear Cache."
Why aren't my Fujifilm simulations importing alongside EXIF data?Navigate to
/admin/configuration
and click "Clear Cache." If this doesn't help, open an issue.
Why do my images appear flipped/rotated incorrectly?Fujifilm simulation data is stored in vendor-specific Makernote binaries embedded in EXIF data. Under certain circumstances an intermediary may strip out this data. For instance, there is a known issue on iOS where editing an image, e.g., cropping it, causes Makernote data loss. If your simulation data appears to be missing, try importing the original file as it was stored by the camera. Additionally, if you can confirm the simulation mode on camera, you can then edit the photo record and manually select it.
For a number of reasons, only EXIF orientations: 1, 3, 6, and 8 are supported. Orientations 2, 4, 5, and 7—which make use of mirroring—are not supported.
EXIF-based photo blog with built-in admin panel, Vercel Postgres as CMS, and Vercel Blob for image storage.
EXIF
Photo Bloghttps://github.com/sambecker/exif-photo-blog/assets/169298/4253ea54-558a-4358-8834-89943cfbafb4
NEXT_PUBLIC_SITE_TITLE
(e.g., My Photos)NEXT_PUBLIC_SITE_DOMAIN
(e.g., photos.domain.com)NEXT_PUBLIC_SITE_DESCRIPTION
(optional—mainly used for OG meta)AUTH_SECRET
ADMIN_EMAIL
ADMIN_PASSWORD
/admin
pnpm i
to install dependenciesAUTH_URL
locally (not in production) to http://localhost:3000/api/url
(this is a temporary limitation of next-auth
v5.0 Beta)vc dev
to start dev server with Vercel-stored environment variables@vercel/analytics
already included)@vercel/speed-insights
already included)⚠️ READ BEFORE PROCEEDING
Usage of this feature will result in fees from OpenAI. When enabling AI text generation, follow all recommended mitigations in order to avoid unexpected charges and attacks. Make sure your OpenAI secret key environment variable is not prefixed with NEXT_PUBLIC.
OPENAI_SECRET_KEY
AI_TEXT_AUTO_GENERATED_FIELDS = title, semantic
Application behavior can be changed by configuring the following environment variables:
NEXT_PUBLIC_PRO_MODE = 1
enables higher quality image storage for jpgs (will result in increased storage usage)NEXT_PUBLIC_BLUR_DISABLED = 1
prevents image blur data being stored and displayed (potentially useful for limiting Postgres usage)NEXT_PUBLIC_GEO_PRIVACY = 1
disables collection/display of location-based dataNEXT_PUBLIC_IGNORE_PRIORITY_ORDER = 1
prevents priority_order
field affecting photo orderNEXT_PUBLIC_PUBLIC_API = 1
enables public API available at /api
NEXT_PUBLIC_HIDE_REPO_LINK = 1
removes footer link to repoNEXT_PUBLIC_HIDE_FILM_SIMULATIONS = 1
prevents Fujifilm simulations showing up in /grid
sidebarNEXT_PUBLIC_HIDE_EXIF_DATA = 1
hides EXIF data in photo details and OG images (potentially useful for portfolios, which don't focus on photography)NEXT_PUBLIC_GRID_ASPECT_RATIO = 1.5
sets aspect ratio for grid tiles (defaults to 1
—setting to 0
removes the constraint)NEXT_PUBLIC_OG_TEXT_ALIGNMENT = BOTTOM
keeps OG image text bottom aligned (default is top)Only one storage adapter—Vercel Blob, Cloudflare R2, or AWS S3—can be used at a time. Ideally, this is configured before photos are uploaded (see Issue #34 for migration considerations). If you have multiple adapters, you can set one as preferred by storing "aws-s3," "cloudflare-r2," or "vercel-blob" in NEXT_PUBLIC_STORAGE_PREFERENCE
.
[{ "AllowedHeaders": ["*"], "AllowedMethods": [ "GET", "PUT" ], "AllowedOrigins": [ "http://localhost:3000", "https://{VERCEL_PROJECT_NAME}*.vercel.app", "{PRODUCTION_DOMAIN}" ] }]
NEXT_PUBLIC_CLOUDFLARE_R2_BUCKET
: bucket nameNEXT_PUBLIC_CLOUDFLARE_R2_ACCOUNT_ID
: account id (found on R2 overview page)NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_DOMAIN
: either "your-custom-domain.com" or "pub-jf90908...s0d9f8s0s9df.r2.dev" (do not include "https://" in your domain)NEXT_PUBLIC
):CLOUDFLARE_R2_ACCESS_KEY
CLOUDFLARE_R2_SECRET_ACCESS_KEY
[{ "AllowedHeaders": ["*"], "AllowedMethods": [ "GET", "PUT" ], "AllowedOrigins": [ "http://localhost:*", "https://{VERCEL_PROJECT_NAME}*.vercel.app", "{PRODUCTION_DOMAIN}" ], "ExposeHeaders": [] }]
NEXT_PUBLIC_AWS_S3_BUCKET
: bucket nameNEXT_PUBLIC_AWS_S3_REGION
: bucket region, e.g., "us-east-1"{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:PutObjectACL", "s3:GetObject", "s3:ListBucket", "s3:DeleteObject" ], "Resource": [ "arn:aws:s3:::{BUCKET_NAME}", "arn:aws:s3:::{BUCKET_NAME}/*" ] } ] }
NEXT_PUBLIC
):AWS_S3_ACCESS_KEY
AWS_S3_SECRET_ACCESS_KEY
My images/content have fallen out of sync with my database and/or my production site no longer matches local development. What do I do?Absent configuration, the default grid aspect ratio is
1
. It can be set to any number (for instance1.5
for 3:2 images) viaNEXT_PUBLIC_GRID_ASPECT_RATIO
or ignored entirely by setting to0
.
I'm seeing server-side runtime errors when loading a page after updating my fork. What do I do?Navigate to
/admin/configuration
and click "Clear Cache."
Why aren't my Fujifilm simulations importing alongside EXIF data?Navigate to
/admin/configuration
and click "Clear Cache." If this doesn't help, open an issue.
Why do my images appear flipped/rotated incorrectly?Fujifilm simulation data is stored in vendor-specific Makernote binaries embedded in EXIF data. Under certain circumstances an intermediary may strip out this data. For instance, there is a known issue on iOS where editing an image, e.g., cropping it, causes Makernote data loss. If your simulation data appears to be missing, try importing the original file as it was stored by the camera. Additionally, if you can confirm the simulation mode on camera, you can then edit the photo record and manually select it.
For a number of reasons, only EXIF orientations: 1, 3, 6, and 8 are supported. Orientations 2, 4, 5, and 7—which make use of mirroring—are not supported.