adds max_width and max_height params to compress method to resize image