The Spanish colonial period, through the 19th century and even into the early 20th century, was an era of very public religiosity. People wanted to show an image of a saint to whom they were devoted. Religion was public.
Part of the church's opposition might have been its pagan connotations. All along, the church has been uncomfortable with what I would call folk religion. But they could do little to stop it.
Typically, outside of churches there would be people selling religious souvenirs. There would be someone selling little prints of an image that might be in the church. They were treasured, worn by soldiers into battle, and became personal badges of affiliation.