The first camera was designed by Johann Zann in 1685. But it was Joseph Nicéphore Niépce who first produced a photograph in 1814. He built and use his own camera and used a piece of paper with silver chloride coating. It darkened when exposed to light and it would need to be exposed in light for 8 hours to make a photograph.
The first ever photograph looks like it was shot from his room’s window with a view of his neighbors’ roofs. It was really difficult back then to take a photo during midday or night as you have no light source. Thanks to his invention, we can now take photos and look at them in just a click.