I'm looking for some way to sort the div so that the image is always on top of the texts, the idea is that when it is in PC you can see one next to the other and in mobiles there is always the image above the texts , the way I have the first block the image is below the text, I thought of an @media to hide the image and put another one when it is in mobiles, but it could be a bit heavy to the echo of being able more photos in the page, if anyone knows how to fix it, I'm only using Boostrap 4
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" integrity="sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B" crossorigin="anonymous">
<div class="row">
<div class="col-12 col-md-7">
<h1>Basic</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit
</p>
</div>
<div class="col-12 col-md-5">
<img class="img-fluid img-thumbnail">
</div>
</div>
<div class="row">
<div class="col-12 col-md-5 ">
<img class="fluid img-thumbnail">
</div>
<div class="col-12 col-md-7 topB">
<h1>Medium </h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit
</p>
</div>
</div>