Can we try replacing this block with just a call to `contacts.List.renderPhoto(item, id)`?  If you want to avoid setting `item.visited = false` unconditionally, you could enhance `renderPhoto()` to perform the `src !== photoUrl` check and return a boolean indicating if the value was actually updated.

I just think it would be good to keep as much of the details here, like `dataset.src`, encapsulated within the list.js file if possible.