feat: use WebP original for full-screen product image viewer

This commit is contained in:
Kirill
2026-05-15 20:24:19 +05:00
parent 56bdcc0351
commit 7e231dbdd8
4 changed files with 18 additions and 10 deletions
-8
View File
@@ -35,14 +35,6 @@ function buildFallbackSrc(src: string, width: number): string {
return `/uploads-resized/${pathPrefix}${parsed.uuid}.webp?w=${width}`
}
/** Get the original WebP URL for full-screen display (no resize) */
export function getOriginalWebpUrl(src: string): string {
const parsed = parseUploadUrl(src)
if (!parsed) return src
const pathPrefix = parsed.subdir ? `${parsed.subdir}/` : ''
return `/uploads/${pathPrefix}${parsed.uuid}.webp`
}
export function OptimizedImage({
src,
alt,