Photography all started with camera obscura which means dark room in Latin. It receives images just like a human eye but upside down as light travels in a straight line.
Johannes Kepler was the inventor of the potable tent which is camera obscura in
Joseph Niépce was a french inventor, and took the earliest surving photograph to this day. It took him serval days to actual take the photograph, thats why he chose a building instead of something that was moving. It was made on a pewter plate and covered it bitumen to make it last.
Camera Obscura is an example of pinhole photography. A problem with camera obscura is that only little light hits the actual photographic paper meaning there wont be an image on the paper. To solve this you could use a bigger hole, but then this means it could give a blurry image as the sunlight is coming from all different directions meaning there is more light coming from the hole.
Image 1: (https://www.aehistory.wordpress.com/)