diff --git a/app/src/render.ts b/app/src/render.ts index 2be3d5a..b589512 100644 --- a/app/src/render.ts +++ b/app/src/render.ts @@ -119,7 +119,11 @@ class Render { } const thumbnailUrl = baseUrl + immich.photoUrl(share.key, asset.id, ImageSize.thumbnail) - const previewUrl = immich.photoUrl(share.key, asset.id, ImageSize.preview) + + // For certain media types, use the original file rather than the preview + const originalSizeMimes = ['image/gif'] + + const previewUrl = immich.photoUrl(share.key, asset.id, originalSizeMimes.includes(asset.originalMimeType || '') ? ImageSize.original : ImageSize.preview) const description = getConfigOption('ipp.showMetadata.description', false) && typeof asset?.exifInfo?.description === 'string' ? asset.exifInfo.description.replace(/'/g, ''') : '' // Create the full HTML element source to pass to the gallery view diff --git a/app/src/types.ts b/app/src/types.ts index 6dc31c7..93547c2 100644 --- a/app/src/types.ts +++ b/app/src/types.ts @@ -18,6 +18,7 @@ export interface Asset { id: string; key: string; originalFileName?: string; + originalMimeType: string; password?: string; fileCreatedAt?: string; // May not exist - see https://github.com/alangrainger/immich-public-proxy/issues/61 type: AssetType;