Thanks for all the help, but the fix was far simpler. I enlarged the image to 1600 px in Photoshop. Using the original code I had written earlier worked fine with all screen sizes. I don't understand why I would need a JS library for something that simple? The code was:
<img style="width: 100%; height: 100%;" alt=""
I checked with a small notebook, a small tablet and my wife's smartphone. The image displayed correctly in all cases