fix: tinyMCE images previews in image selection modal

This commit is contained in:
Muhammad Faraz Maqsood
2025-08-25 17:11:02 +05:00
committed by Muhammad Faraz Maqsood
parent 2a787953ef
commit 86e9c6b1fa
2 changed files with 10 additions and 6 deletions

View File

@@ -28,11 +28,7 @@ const GalleryCard = ({
>
<div className="card-div d-flex flex-row flex-nowrap align-items-center">
<div
className="position-relative"
style={{
width: '200px',
height: '100px',
}}
className="row justify-content-center align-itmes-center p-2"
>
{(thumbnailError && thumbnailFallback) ? (
<div style={{ width: '200px', height: '100px' }}>
@@ -40,7 +36,7 @@ const GalleryCard = ({
</div>
) : (
<Image
style={{ border: 'none', width: '200px', height: '100px' }}
className="selection-modal-image-thumbnail"
src={asset.externalUrl}
onError={thumbnailFallback && (() => setThumbnailError(true))}
/>

View File

@@ -30,3 +30,11 @@
margin-bottom: .4375rem;
margin-top: .4375rem;
}
.selection-modal-image-thumbnail {
width: 180px;
height: 101.25px;
object-fit: contain;
max-width: 100%;
max-height: 100%;
}