Photo: Fix flickering broken image after migrating to Offscreen Canvas blur

This commit is contained in:
Alexander Zinchuk 2024-09-06 15:43:10 +02:00
parent e9c069d356
commit 9b5c527a8a

View File

@ -218,13 +218,15 @@ const Photo = <T,>({
{withBlurredBackground && (
<canvas ref={blurredBackgroundRef} className="thumbnail blurred-bg" />
)}
<img
src={fullMediaData}
className={buildClassName('full-media', withBlurredBackground && 'with-blurred-bg')}
alt=""
style={forcedWidth ? `width: ${forcedWidth}px` : undefined}
draggable={!isProtected}
/>
{fullMediaData && (
<img
src={fullMediaData}
className={buildClassName('full-media', withBlurredBackground && 'with-blurred-bg')}
alt=""
style={forcedWidth ? `width: ${forcedWidth}px` : undefined}
draggable={!isProtected}
/>
)}
{withThumb && (
<canvas
ref={thumbRef}