populates database with existing images