when attaching image, preview pops up