MetaItem use img tag for poster

This commit is contained in:
NikolaBorislavovHristov 2019-09-05 12:58:36 +03:00
parent 723218d145
commit 438353c38f
2 changed files with 4 additions and 5 deletions

View file

@ -49,7 +49,7 @@ const MetaItem = React.memo(({ className, id, type, name, posterShape = 'square'
{
typeof poster === 'string' && poster.length > 0 ?
<div className={styles['poster-image-layer']}>
<div className={styles['poster-image']} style={{ backgroundImage: `url('${poster}')` }} />
<img className={styles['poster-image']} src={poster} alt={' '} />
</div>
:
null

View file

@ -69,12 +69,11 @@
z-index: 1;
.poster-image {
display: block;
width: 100%;
height: 100%;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
background-origin: border-box;
object-fit: cover;
object-position: center;
}
}