feat: portfolio with subpages, hero homepage, and obfuscated asset URLs

This commit is contained in:
ralksta
2026-02-14 00:59:57 +01:00
parent 688a28c7df
commit 415aef98f2
20 changed files with 2231 additions and 123 deletions

20
lib/urls.ts Normal file
View File

@@ -0,0 +1,20 @@
/**
* Server-side URL helpers for generating public-facing asset URLs.
* These use encoded tokens instead of raw Immich UUIDs.
*/
import { encodeAssetId } from './tokens';
/**
* Generate a public image proxy URL for an asset.
*/
export function imageUrl(assetId: string, size: 'thumbnail' | 'preview' | 'original' = 'preview'): string {
return `/api/image/${encodeAssetId(assetId)}?size=${size}`;
}
/**
* Generate a public EXIF API URL for an asset.
*/
export function exifUrl(assetId: string): string {
return `/api/exif/${encodeAssetId(assetId)}`;
}