add images with relative and remove duplicates