add image select logic