I've taken over maintenance of a Wordpress website. My predecessor made a custom "image_send_to_editor" function to add images to posts. All images added this way are "full" size and are not responsive (no srcset).
I need some way to fix this. All images should be "large" size and have the srcset attribute.
I already removed the custom "image_send_to_editor" function, so new images are OK.
Code the image_send_to_editor function spits out:
<a class="lightBox" href="https://mydomain/image-1-1.jpg" rel="attachment op-att-5784" data-relation="group">
<img class="op-att-5784" src="https://mydomain/image-1-1.jpg" alt="image alt text" width="1280" height="720" data-headline="" data-description="" />
</a>
image_send_to_editor just creates the html code for an image, which is then added to a post, the post is then stored in the database.