Fix to image scaling JS so it doesn't allow superwide images.