#73 Display gifs correctly rather than static images

This commit is contained in:
Alan Grainger
2025-07-07 22:22:55 +08:00
parent 7536dc358f
commit 2b1983bb0a
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -119,7 +119,11 @@ class Render {
} }
const thumbnailUrl = baseUrl + immich.photoUrl(share.key, asset.id, ImageSize.thumbnail) 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, ''') : '' 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 // Create the full HTML element source to pass to the gallery view
+1
View File
@@ -18,6 +18,7 @@ export interface Asset {
id: string; id: string;
key: string; key: string;
originalFileName?: string; originalFileName?: string;
originalMimeType: string;
password?: string; password?: string;
fileCreatedAt?: string; // May not exist - see https://github.com/alangrainger/immich-public-proxy/issues/61 fileCreatedAt?: string; // May not exist - see https://github.com/alangrainger/immich-public-proxy/issues/61
type: AssetType; type: AssetType;