How to connect the ESP32 to a SD card and write a file to it.
ESP32: connecting to SD Card
How to interact with a SD card from the ESP32, using the Arduino core.
ESP32 Camera: Image server
How to setup a HTTP server on the ESP32 that will have an endpoint that will return an image taken from a camera connected to the ESP32.