The invention of the daguerreotype in 1839 made portraiture much more commonplace, as many of those who were unable to afford the commission of a painted portrait could afford to sit for a photography session. This cheaper and quicker method also provided the middle class with a means for memorializing dead loved ones.
These photographs served as keepsakes to remember the deceased. This was especially common with infants and young children; Victorian era childhood mortality rates were extremely high, and a post-mortem photograph might have been the only image of the child the family ever had. The later invention of the carte de visite, which allowed multiple prints to be made from a single negative, meant that copies of the image could be mailed to relatives.
The practice eventually peaked in popularity around the end of the 19th century and died out as “snapshot” photography became more commonplace, although a few examples of formal memorial portraits were still being produced well into the 20th century.