private function addAvatars($contacts, $locale)
    {
        $ids = array_filter(array_column($contacts, 'avatar'));
        $avatars = $this->get('sulu_media.media_manager')->getFormatUrls($ids, $locale);
        foreach ($contacts as $key => $contact) {
            if (array_key_exists('avatar', $contact)
                && $contact['avatar']
                && array_key_exists($contact['avatar'], $avatars)
            ) {
                $contacts[$key]['avatar'] = $avatars[$contact['avatar']];
            }
        }

        return $contacts;
    }