img-fluid
utilizes max-width: 100%;
. This means that once the containing element reaches the same size or larger than the image's width, it will cease resizing.
There are two options to consider:
1) Opt for an image with a resolution equal to or greater than the widest width of your container element. If your container element's width is not fixed (e.g. always 80% of viewport width), choose an image large enough to look good on most displays (consider common browser resolutions).
@import url( 'https://maxcdn.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css' );
/* Demonstrational styling, not essential. */
.demo {
background-color: rebeccapurple;
}
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="demo">
<img class="img-fluid" src="https://via.placeholder.com/1000x1000">
</div>
</div>
<div class="col-md-8">
<p>
Lorem ipsum dolor. Lorem ipsum dolor. Lorem ipsum dolor. Lorem ipsum dolor.
Lorem ipsum dolor. Lorem ipsum dolor. Lorem ipsum dolor. Lorem ipsum dolor.
Lorem ipsum dolor. Lorem ipsum dolor. Lorem ipsum dolor. Lorem ipsum dolor.
</p>
</div>
</div>
2) Override .img-fluid
to allow the image to resize beyond its native resolution. The drawback is that the image may appear grainy. Smaller native resolutions will result in more noticeable distortion when scaled up. In my example, you can see that the text becomes quite fuzzy.
@import url( 'https://maxcdn.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css' );
/* Demonstrational styling, not essential. */
.demo {
background-color: rebeccapurple;
}
/* Will override all instances of .img-fluid. */
.img-fluid {
width: 100%;
}
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="demo">
<img class="img-fluid" src="https://via.placeholder.com/100x100">
</div>
</div>
<div class="col-md-8">
<p>
Lorem ipsum dolor. Lorem ipsum dolor. Lorem ipsum dolor. Lorem ipsum dolor.
Lorem ipsum dolor. Lorem ipsum dolor. Lorem ipsum dolor. Lorem ipsum dolor.
Lorem ipsum dolor. Lorem ipsum dolor. Lorem ipsum dolor. Lorem ipsum dolor.
</p>
</div>
</div>
</div>
I've included a scoping example below that enables you to selectively override certain images to exceed their native resolution.
@import url( 'https://maxcdn.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css' );
/* Demonstrational styling, not essential. */
.demo {
background-color: rebeccapurple;
}
/* Scoped for targeting specific images. */
.img-fluid.img-full-width {
width: 100%;
}
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="demo">
<img class="img-fluid img-full-width" src="https://via.placeholder.com/100x100">
</div>
</div>
<div class="col-md-8">
<div class="demo">
<img class="img-fluid" src="https://via.placeholder.com/100x100">
</div>
</div>
</div>
</div>