I was wondering if there’s an extension or some way to create a custom field in which I can drop an image url that’s not part of WordPress library and later extract in theme an img tag with srcset.
for example, if I paste url like this:
//someadress.xyz/image.jpg
I want to get something like this:
<img srcset="//someadress.xyz/image-400x500.jpg 400w, //someadress.xyz/image-600x750.jpg 600w" sizes="(max-width: 1200px) 400px, 600px" src="//someadress.xyz/image-600x750.jpg" alt="">
No. This is dependent on WP knowing what other images exist matching the aspect ratio of the image. WP cannot know what other image sizes exist on some other server.