Generate images from text and references