Integrated the image handling into the flow.