Experiment remove background preview image when image loaded
This commit is contained in:
parent
eb4b22a265
commit
5bb8b3ce29
|
@ -79,6 +79,10 @@ function Media({ media, showOriginal, autoAnimate, onClick = () => {} }) {
|
|||
// Open original image in new tab
|
||||
window.open(url, '_blank');
|
||||
}}
|
||||
onLoad={(e) => {
|
||||
// Hide background image after image loads
|
||||
e.target.parentElement.style.backgroundImage = 'none';
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue