JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<img src="http://static.stuff.co.nz/files/FXXK2.jpg" width="1000">
<img src="http://static.stuff.co.nz/files/FXXK2.jpg"><br>
<input type="button" id="btTeste" value="Altera imagens">

JavaScript

$(document).ready(function(){//executa quando terminar de carregar a pagina
             $('img').each(function(){//passa em todas as imagens (aqui pode fazer mais filtros coloquei generico)
             
                if ($(this).is('[width]')){
                   $(this)
                      .css({
                         'max-width':$(this).attr('width')+(($(this).attr('width')).indexOf('px')<0?'px':''),
                         'width':'100%'
                      })
                      .removeAttr('width')
                   ;//transforma o wdth como maximo e atualiza para ficar responsive
                }
             });   
       });