The first steps to the modern photograph seem to start by Archimedes. He used a box with a little hole on one side and a kind of paper on the other. The image was passing through the hole and was shaping an image on the paper. On this paper Archimedes was lining the details he was interesting on.
This was the first known try to represent with the best accuracy the pictures that were painted until then.
Much later on the same design was added a lens instead of a simple hole to get a lighter image with better accuracy. Next add on was a mirror to inverse the image back to it's normal appearance and not reversed up side down. Devises like that were in use until the end of 18th century for an accurate sketching.
Do you know since when it was a lens available? If we see the perfect quality vases that have been found at the Minoan Crete, we can conclude that the required technology was available from 1500 B.C. at least. These glass objects were made from a mixture of sand and resin material (known as fagentiane) with more metal oxides of copper, soda or potash to achieve the required colour. The cast containing the mixture was fried to a suitable temperature to have a clear glass.
With similar methods were also made a lot of small statues.
At the ruins of the ancient city of Nineyi of Assyria, there have been found an optical lens as perfect as we can make it today. Similar lenses of the same period have been also found at Persia, Libya, Mexico, at Ecuador and central Australia. At the city La Venta of Mexico there have also found small concave mirrors, which are made at the period of Olmecs, the most ancient people of Mexico.
A very good work on optics has made the famous Roger Bakon at 1250 B.C. describing the construction of microscope and telescopes. Unfortunately he was accused as a magician and died ashamed.