mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-04-30 15:59:33 +08:00
chore: ⬆️ merge with upsteam a8e5c55228
This commit is contained in:
parent
43fa4b6f1d
commit
8e03d5a6f9
1 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@
|
|||
h: number
|
||||
}
|
||||
|
||||
const sources = import.meta.glob<Image[]>(['/static/**/*.{jpg,jpeg,png,webp,avif}', '!/static/assets'], {
|
||||
const sources = import.meta.glob<Image[]>(['/src/static/**/*.{jpg,jpeg,png,webp,avif}', '!/src/static/assets'], {
|
||||
query: {
|
||||
format: 'avif',
|
||||
quality: '80',
|
||||
|
@ -24,7 +24,7 @@
|
|||
export let alt: string = src
|
||||
export let loading: 'eager' | 'lazy' = 'lazy'
|
||||
export let decoding: 'async' | 'sync' | 'auto' = 'async'
|
||||
let source: Image[] | undefined = sources[`/static${src}`]
|
||||
let source: Image[] | undefined = sources[`/src/static${src}`]
|
||||
</script>
|
||||
|
||||
{#if source}
|
||||
|
@ -34,4 +34,4 @@
|
|||
</picture>
|
||||
{:else}
|
||||
<img {src} {alt} class={className ?? 'rounded-lg my-2'} {loading} {decoding} />
|
||||
{/if}
|
||||
{/if}
|
Loading…
Reference in a new issue