This is an example of such a Javascript Plugin that can detect screensize and alter the image-src so you get the desired width as a querystring parameter so C1 can resize it correctly on the server
https://github.com/BBC-News/Imager.js
https://github.com/BBC-News/Imager.js