mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(web): use ImmichApi to create urls (#2435)
This commit is contained in:
parent
15fa8250cb
commit
4524aa0d06
13 changed files with 53 additions and 51 deletions
|
|
@ -1,5 +1,11 @@
|
|||
<script lang="ts">
|
||||
import { api, AssetResponseDto, SharedLinkResponseDto, SharedLinkType } from '@api';
|
||||
import {
|
||||
api,
|
||||
AssetResponseDto,
|
||||
SharedLinkResponseDto,
|
||||
SharedLinkType,
|
||||
ThumbnailFormat
|
||||
} from '@api';
|
||||
import LoadingSpinner from '../shared-components/loading-spinner.svelte';
|
||||
import OpenInNew from 'svelte-material-icons/OpenInNew.svelte';
|
||||
import Delete from 'svelte-material-icons/TrashCanOutline.svelte';
|
||||
|
|
@ -69,7 +75,7 @@
|
|||
{:then asset}
|
||||
<img
|
||||
id={asset.id}
|
||||
src={`/api/asset/thumbnail/${asset.id}?format=WEBP`}
|
||||
src={api.getAssetThumbnailUrl(asset.id, ThumbnailFormat.Webp)}
|
||||
alt={asset.id}
|
||||
class="object-cover w-[100px] h-[100px] rounded-lg"
|
||||
loading="lazy"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue