Bootstrap class: .mw-100

<img class="mw-100" src="#" alt="Max-width 100%">

Preview

Max-width 100%

More in Bootstrap Sizing