From 7a04fd6d3e3704170cc73d6c4915d81f3430c90d Mon Sep 17 00:00:00 2001 From: Alan Grainger <16197738+alangrainger@users.noreply.github.com> Date: Mon, 25 May 2026 20:40:09 +0800 Subject: [PATCH] #162 revert previous - fullsize Immich API appears to not yet be functional --- app/public/web.js | 1 - app/src/render.ts | 22 +++++----------------- app/src/types.ts | 1 - app/src/views/gallery.tsx | 5 ----- 4 files changed, 5 insertions(+), 24 deletions(-) diff --git a/app/public/web.js b/app/public/web.js index 94225e9..ba3b2e5 100644 --- a/app/public/web.js +++ b/app/public/web.js @@ -22,7 +22,6 @@ import { thumbHashToDataURL } from '/share/static/thumbhash/thumbhash.js' * @property {'IMAGE'|'VIDEO'} type * @property {string} previewUrl * @property {string} thumbnailUrl - * @property {string} [fullsizeUrl] Optional full-res JPEG; used as the zoom-upgrade target in the lightbox * @property {string} [downloadUrl] * @property {string} [videoData] JSON-stringified video source info * @property {string} [description] Escaped HTML fragment for the lightbox caption diff --git a/app/src/render.ts b/app/src/render.ts index 8a308df..3638237 100644 --- a/app/src/render.ts +++ b/app/src/render.ts @@ -78,22 +78,19 @@ class Render { * Map an ImageSize to the Immich endpoint that serves it. * * Policy: when `ipp.downloadOriginalPhoto` is off, requests for the original - * or fullsize image are silently downgraded to preview — the operator has - * opted out of serving full-resolution files. (The original may also be a - * RAW/HEIC file the browser can't render.) + * image are silently downgraded to preview — the operator has opted out of + * serving full-resolution files. (The original may also be a RAW/HEIC file + * the browser can't render.) */ private resolveImageEndpoint (size: ImageSize): { subpath: string; sizeQueryParam?: string; attachment: boolean } { const allowOriginal = getConfigOption('ipp.downloadOriginalPhoto', true) if (size === ImageSize.original && allowOriginal) { return { subpath: '/original', attachment: true } } - if (size === ImageSize.fullsize && allowOriginal) { - return { subpath: '/thumbnail', sizeQueryParam: 'fullsize', attachment: false } - } if (size === ImageSize.thumbnail) { return { subpath: '/thumbnail', attachment: false } } - // preview, or original/fullsize downgraded because downloadOriginalPhoto is off + // preview, or original downgraded because downloadOriginalPhoto is off return { subpath: '/thumbnail', sizeQueryParam: 'preview', attachment: false } } @@ -140,15 +137,7 @@ class Render { } const thumbnailUrl = immich.photoUrl(share.key, asset.id, ImageSize.thumbnail) - const previewSize = immich.getPreviewImageSize(asset) - const previewUrl = immich.photoUrl(share.key, asset.id, previewSize) - // Emit a zoom-upgrade URL for the lightbox only when it would actually - // be larger than the preview. GIFs already serve as `original` (to keep - // animation), and if the operator has disabled original downloads they - // don't want full-res served at all. - const fullsizeUrl = previewSize === ImageSize.preview && getConfigOption('ipp.downloadOriginalPhoto', true) - ? immich.photoUrl(share.key, asset.id, ImageSize.fullsize) - : undefined + const previewUrl = immich.photoUrl(share.key, asset.id, immich.getPreviewImageSize(asset)) const description = getConfigOption('ipp.showMetadata.description', false) && typeof asset?.exifInfo?.description === 'string' ? escapeHtml(asset.exifInfo.description) : '' @@ -165,7 +154,6 @@ class Render { type: asset.type, previewUrl, thumbnailUrl, - fullsizeUrl, downloadUrl, videoData, description: description || undefined, diff --git a/app/src/types.ts b/app/src/types.ts index 13c99c6..18e4a2c 100644 --- a/app/src/types.ts +++ b/app/src/types.ts @@ -71,7 +71,6 @@ export interface SharedLinkResult { export enum ImageSize { thumbnail = 'thumbnail', preview = 'preview', - fullsize = 'fullsize', original = 'original' } diff --git a/app/src/views/gallery.tsx b/app/src/views/gallery.tsx index abd2afd..b52d9e4 100644 --- a/app/src/views/gallery.tsx +++ b/app/src/views/gallery.tsx @@ -6,11 +6,6 @@ export interface GalleryItem { type: AssetType previewUrl: string thumbnailUrl: string - // Full-resolution JPEG render. Omitted for GIFs (preview is already the - // original, so animation is preserved) and when ipp.downloadOriginalPhoto - // is off (operator opted out of serving full-res). When present, the - // lightbox swaps to this on zoom. - fullsizeUrl?: string downloadUrl?: string // pre-stringified JSON describing the video source (used to build a