Adjusting component heights for images