Revered as the baroque master of lifelike portraits and light and shadow, the 16th-century painter Caravaggio is now being touted as the first master of photographic technique, two centuries before the formal invention of the camera.

The Italian artist has long been suspected of turning his studio into a giant camera obscura, punching a hole in the ceiling to help project images on to his canvas. But new research claims that Caravaggio also used chemicals to turn his canvases into primitive photographic film, "burning" images he then sketched on to for works such as St Matthew and the Angel.

"We were already sure Caravaggio projected images of his sitters, but we have now found mercury salt in his canvases, which is light-sensitive and used in film," said Roberta Lapucci, conservation chief at Florence's SACI institute.

Lapucci said she investigated the use of chemicals after building a camera obscura with artist David Hockney. The technique of using lens and mirrors to project an image was written about by Leonardo da Vinci, and Caravaggio was reputedly inspired to use one by the philosopher Giovanni Battista della Porta.

"You get the image by turning the whole studio into the camera obscura, but you need darkness, and the problem is you cannot paint in darkness," she said. "X-ray fluorescence shows the presence of the mercury salt in his canvases. That is not uncommon because it was used in glue, but we are awaiting proof he was using it on the surface, in his primer."

The image burned into the primer would last about 30 minutes and only be visible in the gloom. "Therefore he used a white lead paint to sketch, mixed with barium sulphate which was luminous, and which we have found traces of. That way he could see where he was sketching."