allow resizing to a fixed width or height keeping the aspect ratio