I'm struggling to resize a responsive image in Bootstrap using the carousel example on their official website.
<div class="container">
<div class="other-div">
....
</div>
<div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
<div class="carousel-inner img-fluid">
<div class="carousel-item active">
<img class="img-fluid" src="/path/1.jpg" alt="First slide">
</div>
<div class="carousel-item">
<img class="img-fluid" src="/path/2.jpg" alt="Second slide">
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
The images are currently displayed like this:
https://i.sstatic.net/a0HaK.png
Here's how I want the images to appear: https://i.sstatic.net/EIN0O.jpg
The image is large, around 3000x1500 px. I want to scale it down to fit the width of the container and maintain its aspect ratio (e.g., 900/450).