How to replace image URL and size when screen size is less than 740px using javascript or jquery?
For example, I want to show one logo for mobile and a different one for large screens.
<p>Large Screens:</p>
<div class="header__logo d-flex align-items-center w-100" style="max-width: 200px;">
<img style="max-width: 200px;" class="rimage__img rimage__img--fade-in lazyload loaded" data-master="//cdn.shopify.com/s/files/1.png" data-scale="2" itemprop="logo" alt="Crafty" srcset="//cdn.shopify.com/s/files/1.png, //cdn.shopify.com/s/files/1.png" data-was-processed="true">
</div>
<p>Small screen</p>
<div class="header__logo d-flex align-items-center w-100" style="max-width: 200px;">
<img style="max-width: 40px;" class="rimage__img rimage__img--fade-in lazyload loaded" data-master="//cdn.shopify.com/s/files/2.png" data-scale="2" itemprop="logo" alt="Crafty" srcset="//cdn.shopify.com/s/files/2.png, //cdn.shopify.com/s/files/2.png" data-was-processed="true">
</div>