private function formatImageEffectSummary(array $summary) {
    $rendered = (string) $this->renderer->renderPlain($summary);
    $plaintext = strip_tags($rendered);
    $trimmed = trim($plaintext);
    $one_line = preg_replace('/[ \n]+/', ' ', $trimmed);
    return $one_line;
  }