He said war can lead young troops to “foolish decisions” and expressed concern the photos could incite fresh violence against Americans.