Handling image_shape