Update image scaling to loop