Yoast SEO
Opengraph: SVG to PNG (1 post)

  1. alternn
    Posted 2 years ago #


    I use SVG images extensively with a fallback for PNG images (at the same URLs).

    As Facebook does not support SVG yet I'd like to make all SVG be presented as PNGs in the opengraph metatags. Now I use:
    $img = str_replace("svg", "png", $img);
    in class-opengraph.php

    Would it be possible to do it in a more elegant way in theme functions for instance? (npw every plugin update removes it)


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic