mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +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,5 @@
|
|||
<script lang="ts">
|
||||
import { AlbumResponseDto, ThumbnailFormat } from '@api';
|
||||
import { AlbumResponseDto, ThumbnailFormat, api } from '@api';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
const dispatcher = createEventDispatcher();
|
||||
|
|
@ -29,7 +29,8 @@
|
|||
>
|
||||
<div class="h-12 w-12">
|
||||
<img
|
||||
src={`/api/asset/thumbnail/${album.albumThumbnailAssetId}?format=${ThumbnailFormat.Webp}`}
|
||||
src={album.albumThumbnailAssetId &&
|
||||
api.getAssetThumbnailUrl(album.albumThumbnailAssetId, ThumbnailFormat.Webp)}
|
||||
alt={album.albumName}
|
||||
class={`object-cover h-full w-full transition-all z-0 rounded-xl duration-300 hover:shadow-lg`}
|
||||
data-testid="album-image"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue