Taking still images on command

do you know of a camera that takes still images on command? I want to take a mugshot when my doorbell is rung.

You have a lot of options. There are many cheap cameras advertised as compatible with a PI.
Most/many DSLRs have a port for triggering stills, but dedicating a DSLR as a door camera might be somewhat over the top.

And ESP32CAM will wake up when a switch is pressed, take a picture, store it on microSD card, and go back to sleep.

I second the suggestion of an esp32cam, they are not great in low light conditions (you can replace the lens to much improve it) but are VERY cheap and surprisingly powerful.

BTW - It looks like there is now a cheap motherboard available for the esp32cam which should make using it a lot easier - search ebay for "esp32cam mb"

You may be interested in my sketch which I created to try and encourage people to give them a try: GitHub - alanesq/esp32cam-demo: esp32cam module demo / project starting point sketch using Arduino ide

alanesq:
You may be interested in my sketch which I created to try and encourage people to give them a try: GitHub - alanesq/esp32cam-demo: esp32cam module demo / project starting point sketch using Arduino ide

Good job.

I have manged to turn one of the ESP32CAMs into a LoRa based high altitude balloon tracker. Wakes up, takes a picture, saves it in SD, sends the location payload as LoRa, goes back to sleep.