Updated the image scaling utility method to resize to fit a width