fix resizing, image extension