Compare commits

...

1 Commits

Author SHA1 Message Date
psychedelicious
633dcea412 feat(ui): do not use thumbnail images as fallbacks
Theoretically using thumbnail images as fallbacks provides a better user
experience:

- Start loading both thumbnail and full image
- Render the thumbnail when it is ready
- Then render the full image when it is ready, typically _after_ the
thumbnail

But this does make more network requests, and adds an extra render when
we show images (== perf hit). In testing locally, it actually feels
snappier without the thumbnail fallback (likely psychosomatic). It
certainly does not feel any _worse_, so I think this is a good change.
2025-09-04 12:09:15 +10:00
4 changed files with 0 additions and 6 deletions

View File

@@ -75,7 +75,6 @@ export const DndImage = memo(
role="button"
ref={ref}
src={asThumbnail ? imageDTO.thumbnail_url : imageDTO.image_url}
fallbackSrc={asThumbnail ? undefined : imageDTO.thumbnail_url}
width={imageDTO.width}
height={imageDTO.height}
sx={sx}

View File

@@ -56,7 +56,6 @@ export const ImageComparisonHover = memo(({ firstImage, secondImage, rect }: Com
<Image
id="image-comparison-hover-first-image"
src={firstImage.image_url}
fallbackSrc={firstImage.thumbnail_url}
crossOrigin={crossOrigin}
w={fittedDims.width}
h={fittedDims.height}
@@ -93,7 +92,6 @@ export const ImageComparisonHover = memo(({ firstImage, secondImage, rect }: Com
position="relative"
id="image-comparison-hover-second-image"
src={secondImage.image_url}
fallbackSrc={secondImage.thumbnail_url}
crossOrigin={crossOrigin}
w={compareImageDims.width}
h={compareImageDims.height}

View File

@@ -55,7 +55,6 @@ const SideBySideImage = memo(({ imageDTO, type }: { imageDTO: ImageDTO; type: 'f
maxW="full"
maxH="full"
src={imageDTO.image_url}
fallbackSrc={imageDTO.thumbnail_url}
crossOrigin={crossOrigin}
objectFit="contain"
borderRadius="base"

View File

@@ -134,7 +134,6 @@ export const ImageComparisonSlider = memo(({ firstImage, secondImage, rect }: Co
position="relative"
id="image-comparison-second-image"
src={secondImage.image_url}
fallbackSrc={secondImage.thumbnail_url}
crossOrigin={crossOrigin}
w={compareImageDims.width}
h={compareImageDims.height}
@@ -157,7 +156,6 @@ export const ImageComparisonSlider = memo(({ firstImage, secondImage, rect }: Co
<Image
id="image-comparison-first-image"
src={firstImage.image_url}
fallbackSrc={firstImage.thumbnail_url}
crossOrigin={crossOrigin}
w={fittedDims.width}
h={fittedDims.height}