I have a product image with white background color. Image source link comes from client side database. So, I need to convert image in to a transparent background color (from white) with JS or CSS.
Anyone know a better solution for this?
I heard about by adding bkgnd=transparent
value to image URL, Is it a possible way?
Searched a lot time in google, but didn't get any proper solution.
See my code:
.container {
width: 100%;
max-width: 600px;
padding: 10px;
background: url(https://picsum.photos/200/300) center center no-repeat;
background-size: cover;
}
img {
width: 100%;
}
<div class="container">
<img src="https://imgd.aeplcdn.com/1056x594/n/suk7osa_1474663.jpg?q=85">
</div>