HTML Demo: <picture>

<!--Change the browser window width to see the image change.-->

<picture>
<source srcset="/media/cc0-images/surfer-240-200.jpg" media="(orientation: portrait)" />
<img src="/media/cc0-images/painted-hand-298-332.jpg" alt="" />
</picture>

Output