I am trying to make it so that as an image loads in my bootstrap card, it either has a placeholder image (to keep the card the same size) or a loading spinner. I cannot figure out how to do this, here is my current card html:
<div class="card mb-4" data-clickable="true" data-href="#">
<img class="card-img-top" src="https://via.placeholder.com/700x400" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">John Doe</h5>
</div>
<div class="card-footer">
<small class="text-muted">Last updated 3 mins ago</small>
</div>
</div>
Obviously the placeholder will be replaced with the full image, but my current problem is that before the image loads on slow connection, the card collapses since the image isn't there to fill it.