Avoid bug with redundantly adding images.