Add auto resize to adapt image size.