#73 Display gifs correctly rather than static images
This commit is contained in:
+5
-1
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user