Use resize_to_limit instead of resize_to_fit