Allow disabling static generation and tuning static params limits via env vars to reduce build output size on low-disk CI providers.
Co-authored-by: Cursor <cursoragent@cursor.com>
Validate presigned upload responses and fall back to Vercel Blob when third-party storage upload fails so photo uploads remain available.
Co-authored-by: Cursor <cursoragent@cursor.com>
Switch next.config.ts from CommonJS export to default export so OpenNext wrappers can import the original config during type checking.
Co-authored-by: Cursor <cursoragent@cursor.com>
Guard the OG photo grid against empty URL results so prerendering does not crash when an optimized image fetch fails.
Co-authored-by: Cursor <cursoragent@cursor.com>
* add masonry layout for photo grids
- NEXT_PUBLIC_MASONRY_GRID env variable to turn masonry layout on and
off
- added PhotoGridMasonry.tsx to handle masonry layout
* fixed albums showing all photos when masonry grid is enabled
* only render infinite photo scroll for masonry grid when total photo count is greater than loaded photos
* fixed masonry grid lcp warnings
* add NEXT_PUBLIC_MASONRY_GRID description to README
* Use custom icon for masonry layout
* Add masonry to in-app config
* Simplify masonry architecture
---------
Co-authored-by: Sam Becker <sam@sambecker.com>
Handle null exif.tags in getOffsetFromExif
`Object.values()` throws "Cannot convert undefined or null to object"
when `exif.tags` or `exifr` is null/undefined. This occurs when
uploading images that lack EXIF data (e.g., AI-generated images,
screenshots, or graphics). The issue is reproducible on Chrome but
not on Safari, likely due to differences in how each browser's
EXIF parsing pipeline populates these values.
This fix adds nullish coalescing fallbacks (`?? {}`) so that
`Object.values()` always receives a valid object.
* Fix optional chaining in getOffsetFromExif
If `exif` itself is null/undefined,
accessing `exif.tags` would throw before the `??` fallback kicks in.