From 73a2f84489b27c34d0c11ae9753c0f00b8a1fd06 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Mon, 20 Jan 2025 12:21:37 -0600 Subject: [PATCH] Move original upload configuration into 'performance' --- README.md | 2 +- src/site/SiteChecklistClient.tsx | 25 +++++++++++++------------ src/site/config.ts | 10 +++++----- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index adc37d22..167b26af 100644 --- a/README.md +++ b/README.md @@ -106,11 +106,11 @@ Application behavior can be changed by configuring the following environment var - `NEXT_PUBLIC_STATICALLY_OPTIMIZE_PHOTOS = 1` enables static optimization for photo pages (`p/[photoId]`), i.e., renders pages at build time - `NEXT_PUBLIC_STATICALLY_OPTIMIZE_PHOTO_OG_IMAGES = 1` enables static optimization for OG images, i.e., renders images at build time - `NEXT_PUBLIC_STATICALLY_OPTIMIZE_PHOTO_CATEGORIES = 1` enables static optimization for photo categories (`tag/[tag]`, `shot-on/[make]/[model]`, etc.), i.e., renders pages at build time +- `NEXT_PUBLIC_PRESERVE_ORIGINAL_UPLOADS = 1` do not compress photo uploads before storing #### Site behavior - `NEXT_PUBLIC_GRID_HOMEPAGE = 1` shows grid layout on homepage - `NEXT_PUBLIC_DEFAULT_THEME = light | dark` sets preferred initial theme (defaults to `system` when not configured) -- `NEXT_PUBLIC_PRESERVE_ORIGINAL_UPLOADS = 1` do not optimize photo uploads before storing (⚠️ results in increased storage usage) - `NEXT_PUBLIC_MATTE_PHOTOS = 1` constrains the size of each photo, and enables a surrounding border (potentially useful for photos with tall aspect ratios) - `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 data (⚠️ re-compresses uploaded images in order to remove GPS information) diff --git a/src/site/SiteChecklistClient.tsx b/src/site/SiteChecklistClient.tsx index 238bda37..752db7df 100644 --- a/src/site/SiteChecklistClient.tsx +++ b/src/site/SiteChecklistClient.tsx @@ -55,9 +55,9 @@ export default function SiteChecklistClient({ arePhotosStaticallyOptimized, arePhotoOGImagesStaticallyOptimized, arePhotoCategoriesStaticallyOptimized, + areOriginalUploadsPreserved, isGridHomepageEnabled, defaultTheme, - areOriginalUploadsPreserved, arePhotosMatted, isBlurEnabled, isGeoPrivacyEnabled, @@ -447,8 +447,9 @@ export default function SiteChecklistClient({ status={isStaticallyOptimized} optional > - Set environment variable to {'"1"'} to enable static optimization, - i.e., render pages and images at build time: + Set environment variable to {'"1"'} to make site more responsive + by enabling static optimization + (i.e., rendering pages and images at build time): {renderSubStatusWithEnvVar( arePhotosStaticallyOptimized ? 'checked' : 'optional', 'NEXT_PUBLIC_STATICALLY_OPTIMIZE_PHOTOS', @@ -462,6 +463,15 @@ export default function SiteChecklistClient({ 'NEXT_PUBLIC_STATICALLY_OPTIMIZE_PHOTO_CATEGORIES', )} + + Set environment variable to {'"1"'} to prevent + image uploads being compressed before storing: + {renderEnvVars(['NEXT_PUBLIC_PRESERVE_ORIGINAL_UPLOADS'])} + - - Set environment variable to {'"1"'} to prevent - image uploads being optimized before storing: - {renderEnvVars(['NEXT_PUBLIC_PRESERVE_ORIGINAL_UPLOADS'])} -