- Add FadeIn component (IntersectionObserver scroll-reveal + load animation) - Add dark/light theme toggle (useSyncExternalStore + localStorage) - Add scroll-to-top button (appears after 300px scroll) - Add configurable footer with social links (gallery.yaml) - Add crosshair cursor on photo grid items - Add 'X photos' count badge on subpage cover images - Add light theme color palette in tokens.css
25 lines
712 B
TypeScript
25 lines
712 B
TypeScript
/**
|
|
* Custom next/image loader for Immich proxy.
|
|
*
|
|
* Referenced by next.config.ts via images.loaderFile.
|
|
* Generates URLs that point to our /api/image proxy route,
|
|
* passing width and quality as query parameters.
|
|
*
|
|
* The src passed to next/image should already be a full proxy URL
|
|
* (e.g. /api/image/<token>?size=preview). This loader appends
|
|
* w and q params for responsive srcset generation.
|
|
*/
|
|
|
|
'use client';
|
|
|
|
interface ImageLoaderParams {
|
|
src: string;
|
|
width: number;
|
|
quality?: number;
|
|
}
|
|
|
|
export default function immichLoader({ src, width, quality }: ImageLoaderParams): string {
|
|
const separator = src.includes('?') ? '&' : '?';
|
|
return `${src}${separator}w=${width}&q=${quality || 75}`;
|
|
}
|