Code:
let images = document.getElementsByTagName('img');
for (i=0;i<images.length;i++){
let imageSrc = images[i].src.replace("http://","http://1");
images[i].src = imageSrc;
}
This code will modify all the images on the page. If you only want to modify 1 image, give the image an id and change "getElementsByTagName" to "getElementById" and replace "img" with the id of the image.
And don't put the script tags withing the img tag. It should be separate as it's own tag.