diff --git a/src/components/ImageBlurFallback.tsx b/src/components/ImageBlurFallback.tsx index 7c2aa474..acdd58fc 100644 --- a/src/components/ImageBlurFallback.tsx +++ b/src/components/ImageBlurFallback.tsx @@ -8,13 +8,13 @@ import Image, { ImageProps } from 'next/image'; import { useCallback, useEffect, useRef, useState } from 'react'; export default function ImageBlurFallback(props: ImageProps & { - blurCompatibilityMode?: boolean + blurCompatibilityLevel?: 'none' | 'low' | 'high'; }) { const { className, priority, blurDataURL, - blurCompatibilityMode, + blurCompatibilityLevel = 'low', ...rest } = props; @@ -54,6 +54,16 @@ export default function ImageBlurFallback(props: ImageProps & { !wasCached && !hideBlurPlaceholder; + const getBlurClass = () => { + switch (blurCompatibilityLevel) { + case 'high': + // Fix poorly blurred placeholder data generated on client + return 'blur-[4px] @xs:blue-md scale-[1.05]'; + case 'low': + return 'blur-[2px] @xs:blue-md scale-[1.01]'; + } + }; + return (
: diff --git a/src/photo/form/PhotoForm.tsx b/src/photo/form/PhotoForm.tsx index ce69fd7f..e180b6e2 100644 --- a/src/photo/form/PhotoForm.tsx +++ b/src/photo/form/PhotoForm.tsx @@ -214,9 +214,16 @@ export default function PhotoForm({ key: keyof PhotoDbInsert | 'favorite', hideIfEmpty?: boolean, shouldHide?: (formData: Partial