I’m trying to replace current featured image on blog post setup and I’m using GeneratePress Header Element.
What I’ve done is used this code to create a shortcode and added that shorcode in my element.
That’s all working fine, issue I have now is that image doesn’t have srcset on frontend. This means that full size image is loading on mobile phone and slowing down the page.
Is there a way to modify that code to add srcset or for me to do it another way?