This will probably break if there are both CD photos and Imgur photos. It's probably best to combine all images in team_controller.py and iterate through them with a single for loop here, and check the type to decide whether it's a CD photo or Imgur photo.

Doing this will also avoid the need to do `medias_by_slugname.cdphotothread|add:medias_by_slugname.imgur|length > 1` below.