80

Is it possible to use an SVG for an Open Graph image?

I tried it and it didn't work with Facebook, however I'm unsure if it's a problem with my SVG or if it's generally not possible.

I did it like this:

<meta content="http://www.example.com/mylogo.svg" property="og:image">
Mark Amery
  • 143,130
  • 81
  • 406
  • 459
Raphael Jeger
  • 5,024
  • 13
  • 48
  • 79
  • I doubt it’s possible at all. Did the [debug tool](https://developers.facebook.com/tools/debug) have anything to say about it? – CBroe Feb 07 '14 at 19:55
  • No, honestly I just put it on one of my pages as a test where there are other images, it just ignored it totally. – Raphael Jeger Feb 07 '14 at 20:06
  • 2
    I just ran into the same issue. Switched some pngs to SVG, and Facebook ignored it, even afterI explicitly set ``. frustrating. curious if you had any luck fixing this? – Andrew Brown Apr 08 '14 at 20:17

2 Answers2

87

OpenGraph does not support .svg as images

http://indiewebcamp.com/The-Open-Graph-protocol#Does_not_support_SVG_images

caligoanimus
  • 1,114
  • 8
  • 8
8

As of May 2014, Facebook does not formally define what images they support (you can read their best practices here), though the implication by the optimal sizes (1200 x 630 pixels for high resolution devices and 600 x 315 pixels for standard resolution devices) is that the image must be a raster format.

Jason Sperske
  • 29,816
  • 8
  • 73
  • 124
  • 7
    As of Jan 14, 2021, Facebook's Sharing Debugger at https://developers.facebook.com/tools/debug/ emits a warning: Unsupported Image File Extension — Provided `og:image` URL, `https://example.com/og_image.svg` does not have a supported extension. – webknjaz -- Слава Україні Jan 14 '21 at 14:14