ESP32-Cam modules are dead cheap and also feature more processing power and RAM.
On a Photon you could hardly - if at all - accomodate a bitmap 320x200 @ 8bit as that would require 64K RAM and unpacking JPEG images is no option either - let alone process the image.