mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
fix(server, web): harden auto pick album thumbnails (#918)
This commit is contained in:
@@ -19,7 +19,13 @@
|
||||
|
||||
export let album: AlbumResponseDto;
|
||||
|
||||
const NO_THUMBNAIL = 'no-thumbnail.png';
|
||||
|
||||
let imageData = `/api/asset/thumbnail/${album.albumThumbnailAssetId}?format=${ThumbnailFormat.Webp}`;
|
||||
if (!album.albumThumbnailAssetId) {
|
||||
imageData = NO_THUMBNAIL;
|
||||
}
|
||||
|
||||
const dispatchClick = createEventDispatcher<OnClick>();
|
||||
const dispatchShowContextMenu = createEventDispatcher<OnShowContextMenu>();
|
||||
|
||||
@@ -45,7 +51,7 @@
|
||||
};
|
||||
|
||||
onMount(async () => {
|
||||
imageData = (await loadHighQualityThumbnail(album.albumThumbnailAssetId)) || 'no-thumbnail.png';
|
||||
imageData = (await loadHighQualityThumbnail(album.albumThumbnailAssetId)) || NO_THUMBNAIL;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user