let generator public image become a function.