How to design a module that send photos from microcontroller to web server via wifi?
Implementing this type of project starting from the microcontroller up will be drastically more difficult than using SOC (system on a chip) like the Raspberry Pi or Intel Galileo etc. I've done this using the Raspberry Pi and python.

Here is a rough overview on the steps necessary to implement this on the Raspberry Pi:

-first start the Pi server using Apache to generate your personal server. A domain name is not required, but might be useful.  Here is a guide on that.

-Connect a USB camera and gain familiarity.  Here is guide on that.

-Within Linux, You can schedule photos using CRONTAB to store them in a particular folder.

Once you get the basics down, you can start using the GPIO headers to add sensors (to detect motion, heat, etc) and send email or text alerts. This can be accomplished in Python. Live streaming feed is also possible using OpenCV and Flask servers.