feat: add remote url to image srcset in case original is down
This commit is contained in:
parent
7760d03f9d
commit
8537c8ee54
|
@ -10,6 +10,7 @@ const { attachment } = defineProps<{
|
|||
const src = $computed(() => attachment.previewUrl || attachment.url || attachment.remoteUrl!)
|
||||
const srcset = $computed(() => [
|
||||
[attachment.url, attachment.meta?.original?.width],
|
||||
[attachment.remoteUrl, attachment.meta?.original?.width],
|
||||
[attachment.previewUrl, attachment.meta?.small?.width],
|
||||
].filter(([url]) => url).map(([url, size]) => `${url} ${size}w`).join(', '))
|
||||
|
||||
|
|
Loading…
Reference in a new issue