I'm currently developing a CRUD application for an ecommerce platform. My main focus right now is on displaying product cards in a uniform and aligned manner, regardless of the uploaded images' original size.
https://i.sstatic.net/YhsWx.png
Here's an example using HTML with Bootstrap:
<div className="card h-100">
<a href="#!">
<img
className="img-fluid w-100 img-card"
src={`/uploads/${product.fileName}`}
alt="product"
/>
</a>
</div>
And here's some corresponding CSS to automatically resize the images:
.img-card{
height: auto;
max-height: 250px;
width: auto;
}