Updating image size to match layout