I load an image with img = imageio.imread('hello.jpg').
I want to return this numpy array as an image. I know I can do return FileResponse('hello.jpg'), however, in the future, I will have the pictures as numpy arrays.
How can I return the numpy array img from FastAPI server in a way that it is equivalent to return FileResponse('hello.jpg')?