solve the problem of "mainImage attribute not work".