Recently, I attempted to enhance my Carousel in Bootstrap by adding more images. Initially, I inserted the code snippet below within the ordered list with the class "carousel-indicators."
<li data-target="#carouselExampleCaptions" data-slide-to="3"></li>
I then added a new slide (shown below) inside the div with the class "carousel-inner," alongside the original three slides.
<div class="carousel-inner mx-auto">
<div class="carousel-item">
<img src="pic.jpg" class="d-block w-100" alt="pic">
<div class="carousel-caption d-none d-md-block">
</div>
</div>
</div>
However, upon testing the website and navigating through the carousel, once I reached the last image, the carousel broke. I was unable to go back to previous pictures or advance further.
In an attempt to troubleshoot, I referenced a related question titled "Bootstrap 4 Multi Carousel show 4 images instead of 3." Unfortunately, implementing that code completely disrupted the carousel. Three out of the four images were displayed on-screen vertically, with one containing the carousel controls. Any attempt to interact with the controls resulted in the entire carousel disappearing.