mirror of
https://github.com/immich-app/immich.git
synced 2025-07-03 21:40:00 +02:00
refactor(web): remove buffer package (#11058)
This commit is contained in:
parent
1b3a7feb67
commit
5748f50c1f
5 changed files with 29 additions and 47 deletions
web/src/lib/components/assets/thumbnail
|
@ -1,9 +1,8 @@
|
|||
<script lang="ts">
|
||||
import { onMount, tick } from 'svelte';
|
||||
import { decodeBase64 } from '$lib/utils';
|
||||
import { fade } from 'svelte/transition';
|
||||
import { thumbHashToDataURL } from 'thumbhash';
|
||||
// eslint-disable-next-line unicorn/prefer-node-protocol
|
||||
import { Buffer } from 'buffer';
|
||||
import { mdiEyeOffOutline } from '@mdi/js';
|
||||
import Icon from '$lib/components/elements/icon.svelte';
|
||||
|
||||
|
@ -62,7 +61,7 @@
|
|||
<img
|
||||
style:width={widthStyle}
|
||||
style:height={heightStyle}
|
||||
src={thumbHashToDataURL(Buffer.from(thumbhash, 'base64'))}
|
||||
src={thumbHashToDataURL(decodeBase64(thumbhash))}
|
||||
alt={altText}
|
||||
{title}
|
||||
class="absolute top-0 object-cover"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue