#101 Add loading spinner

This commit is contained in:
Alan Grainger
2025-07-11 21:09:06 +02:00
parent fe3ad806ff
commit a7d7bf22b8
7 changed files with 43 additions and 8 deletions
+12
View File
@@ -254,6 +254,18 @@ class Immich {
return baseUrl + query
}
/**
* Return the correct preview size, depending on the image MIME type
*/
getPreviewImageSize (asset: Asset) {
// For certain media types, use the original file rather than the preview
if (['image/gif'].includes(asset.originalMimeType || '')) {
return ImageSize.original
} else {
return ImageSize.preview
}
}
/**
* Return the image data URL for a photo
*/