Ancestor portraits such as the current example would have played a part in the ceremonies of reference that all Chinese families carried out in honor of their forebearers. They would have been displayed on special occasions such as New Year and birthdays, when the living members of the family would make offerings to the spirits of their dead relatives at altars within their own home or at a family temple. These services were family affairs and not a public form of worship.
The veneration of past generations, a practice that dates from at least the Bronze Age in China was incorporated by Confucius (551-479 BCE) into a set of rules about how to live a worthy life. This moral system, which still influences life in China today, was based on the 'five relationships', - between ruler and subject, father and son, husband and wife, elder brother and younger brother, and friend and friend. Confucius believed that if everyone accepted their place in the social hierarchy and behaved appropriately, the country would be at peace and free from natural disasters such as earthquakes. Confucianism was not much concerned with the spiritual life and so perhaps cannot strictly be called a religion, but its code was central to people's lives in the same way as a religion's creed might be.