From 1109ce7212fb0be4e7c6ad71389bcb719ab7eb49 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Fri, 7 Jun 2024 16:40:40 -0500 Subject: [PATCH] Test EXIF removal with sharp, add note about file manipulation --- README.md | 2 +- src/photo/server.ts | 1 + src/services/postgres.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ba79b9c5..cb561d56 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ Application behavior can be changed by configuring the following environment var - `NEXT_PUBLIC_STATICALLY_OPTIMIZE_OG_IMAGES = 1` enables static optimization for OG images, i.e., renders images at build time (results in increased project usage)—⚠️ _Experimental_ - `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 +- `NEXT_PUBLIC_GEO_PRIVACY = 1` disables collection/display of location-based data (⚠️ modifies original images in subtle ways in order to remove identifying information) - `NEXT_PUBLIC_IGNORE_PRIORITY_ORDER = 1` prevents `priority_order` field affecting photo order - `NEXT_PUBLIC_PUBLIC_API = 1` enables public API available at `/api` - `NEXT_PUBLIC_HIDE_REPO_LINK = 1` removes footer link to repo diff --git a/src/photo/server.ts b/src/photo/server.ts index bf39bf1a..249afc48 100644 --- a/src/photo/server.ts +++ b/src/photo/server.ts @@ -149,4 +149,5 @@ export const removeGpsData = async (image: ArrayBuffer) => GPSAltitudeRef: '-', }, }) + .jpeg({ quality: 100 }) ); diff --git a/src/services/postgres.ts b/src/services/postgres.ts index c6442e92..d1169d94 100644 --- a/src/services/postgres.ts +++ b/src/services/postgres.ts @@ -1,5 +1,5 @@ import { POSTGRES_SSL_ENABLED } from '@/site/config'; -import { Pool, QueryResult, QueryResultRow } from 'pg'; +import { Pool, QueryResult, QueryResultRow } from 'pg'; const pool = new Pool({ connectionString: process.env.POSTGRES_URL,