mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
refactor(web): use ImmichApi to create urls (#2435)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { error } from '@sveltejs/kit';
|
||||
import { getThumbnailUrl } from '$lib/utils/asset-utils';
|
||||
import { ThumbnailFormat } from '@api';
|
||||
import { ThumbnailFormat, api as clientApi } from '@api';
|
||||
import type { PageServerLoad } from './$types';
|
||||
import featurePanelUrl from '$lib/assets/feature-panel.png';
|
||||
|
||||
@@ -19,7 +18,7 @@ export const load = (async ({ params, locals: { api } }) => {
|
||||
title: sharedLink.album ? sharedLink.album.albumName : 'Public Share',
|
||||
description: sharedLink.description || `${assetCount} shared photos & videos.`,
|
||||
imageUrl: assetId
|
||||
? getThumbnailUrl(assetId, ThumbnailFormat.Webp, sharedLink.key)
|
||||
? clientApi.getAssetThumbnailUrl(assetId, ThumbnailFormat.Webp, sharedLink.key)
|
||||
: featurePanelUrl
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user