Skip to content

A continuation of HomeBox the inventory and organization system built for the Home User

Fix item detail photo grid to load thumbnails instead of originals (#1607)

letob3accb7eb318
diff --git a/frontend/pages/item/[id]/index.vue b/frontend/pages/item/[id]/index.vue
index 4334790a..b540eaa0 100644
--- a/frontend/pages/item/[id]/index.vue
+++ b/frontend/pages/item/[id]/index.vue
@@ -804,10 +804,7 @@
<template #title> {{ $t("items.photos") }} </template>
<div class="scroll-bg container mx-auto flex max-h-[500px] flex-wrap gap-2 overflow-y-scroll border-t p-4">
<button v-for="(img, i) in photos" :key="i" @click="openImageDialog(img, item.id)">
- <picture>
- <source :srcset="img.originalSrc" :type="img.originalType" />
- <img class="max-h-[200px] rounded" :src="img.thumbnailSrc" alt="attachment image" />
- </picture>
+ <img class="max-h-[200px] rounded" :src="img.thumbnailSrc" :alt="$t('items.photo')" loading="lazy" />
</button>
</div>
</BaseCard>