Unless there is something I am missing, I don't think that approach serves my purpose. I don't want to resize the width, I am trying to serve different images really, so that the weight of the images on mobile is lighter than on desktop.
For instance, in desktop I'll have the full resolution but on mobile I would serve the medium or thumbnail version.
Using breakpoints only, the image would always be the same wouldn't it?
In that case if you want to display different size image per device:
Toolset offer's bootstrap 4. you should enable if if you did not enable from:
=> Toolset => Settings => General tab => Bootstrap loading => Select option "Toolset should load Bootstrap 4"
and then try to use the following code:
<div class="row">
<!-- For extra small -->
<div class="d-xs-block d-sm-none">
<img class="img-responsive" src="[types field='imagen-aplicacion' size='thumbnail' url='true'][/types]" />
</div>
<!-- For small/mobile -->
<div class="d-none d-sm-block d-md-none"><img class="img-responsive" src="[types field='imagen-aplicacion' size='thumbnail' url='true'][/types]" /></div>
<!-- For medium/tablet -->
<div class="d-none d-md-block d-lg-none"><img class="img-responsive" src="[types field='imagen-aplicacion' size='medium' url='true'][/types]" /></div>
<!-- For large/desktop -->
<div class="d-none d-lg-block d-xl-none"><img class="img-responsive" src="[types field='imagen-aplicacion' size='large' url='true'][/types]" /></div>
<!-- For extra large -->
<div class="d-none d-xl-block"><img class="img-responsive" src="[types field='imagen-aplicacion' size='extra-large' url='true'][/types]" />
</div>
</div>
You can set the different image size by adjusting the size attribute per device as required.
I hope the above solution will help you to resolve the issue.