I am making a WP theme from scratch and I don’t seem to get the responsive images working. An image that’s inserted at 500px will stay at 500px even though srcset and sizes tags are added. From my understanding this image should display automatically at 300px on the mobile phones?
<img class="alignleft size-full wp-image-446" src="couple_group_session.jpg" alt="" width="500" height="333" srcset="couple_group_session.jpg 500w, couple_group_session-300x200.jpg 300w" sizes="(max-width: 500px) 100vw, 500px">
Should I be adding something in the WordPress functions.php file to actually get it working?