most of the stuff needed to add an image from the queue