feat: compress uploads and serve resized image variants via /api/img
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
aria-label="بزرگنمایی تصویر"
|
||||
@click="previewOpen = true"
|
||||
>
|
||||
<img v-lazy="lookup.imageUrl" :alt="lookup?.productTitle ?? ''" />
|
||||
<img v-lazy="imageUrl(lookup.imageUrl, 200)" :alt="lookup?.productTitle ?? ''" />
|
||||
</button>
|
||||
<div v-else class="oi__art oi__art--empty" aria-hidden="true">
|
||||
<Icon icon="vuesax-linear:diamonds" size="18" />
|
||||
@@ -63,7 +63,7 @@
|
||||
<button type="button" class="oi__previewClose" aria-label="بستن" @click="previewOpen = false">
|
||||
<Icon icon="vuesax-linear:close-circle" size="22" />
|
||||
</button>
|
||||
<img class="oi__previewImg" :src="lookup.imageUrl" :alt="lookup.productTitle ?? ''" />
|
||||
<img class="oi__previewImg" :src="imageUrl(lookup.imageUrl, 1600)" :alt="lookup.productTitle ?? ''" />
|
||||
</div>
|
||||
</Transition>
|
||||
</Teleport>
|
||||
@@ -75,6 +75,7 @@ import { computed, ref, watch, onBeforeUnmount } from 'vue'
|
||||
import Icon from '../icon/Icon.vue'
|
||||
import { orderItemLookup } from '../../composables/useOrderItemProduct'
|
||||
import type { OrderItemDetail } from '../../api/client'
|
||||
import { imageUrl } from '../../utils/image'
|
||||
|
||||
const props = defineProps<{ value: OrderItemDetail }>()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user