tying to make sure the image doesn't exceed the width of the page