Patañjali's Yogasūtra I.9

I.9 - śabda-jñāna-anupātī vastu-śūnyaḥ vikalpaḥ

Imagination arises out of words and expressions, [while] the object [itself] is absent.

Imagination happens in the absence of any direct perception. References to the meaning, connotations or implications of descriptive words guides imagination. It may be further helped if the words are used poetically or metaphorically. It can also be assisted by dreams, feelings and emotions. Past experiences, memory and associations often contribute to imagination.