1

I have image that is being generated in runtime on my website and I display it in xml using xsl to show like html:

<img src="data:image/png;base64,<!-- base64 data -->" />

Now, I want for Facebook to fetch this image, but if I do the same for og:image meta tag, facebook debugger gives me an Errors That Must Be Fixed:

Object Invalid Value Object at URL 'http://www.sample.com/generator.xml' of type 'website' is invalid because the given value 'data:image/png;base64,.....' for property 'og:image:url' could not be parsed as type 'url'.

Any solution?

<meta property='og:image' content='data:image/png;base64,<!-- base64 data -->'/>

Of course, I would like to avoid permanent saving of files since they are always different and it would get too crowded very quickly

cagoscra
  • 19
  • 7
  • You need to give back Facebook a url to the image. Facebook will scrape your page. Get the url for the image. Then download that image. – WizKid Nov 21 '14 at 00:53
  • For security reasons of the server it only gives me the image in that format so I don't have the URL of the image as you say. :( – cagoscra Nov 21 '14 at 01:09
  • Then it will not work – WizKid Nov 21 '14 at 01:09
  • possible duplicate of [Pass Base64 jpeg image to og:image](http://stackoverflow.com/questions/18460421/pass-base64-jpeg-image-to-ogimage) – phwd Nov 21 '14 at 16:08
  • Does any body knows how to implement php code in a xml file? is it possible? – cagoscra Nov 21 '14 at 17:04
  • It is not the same problem because I've got the meta tag in a xml file to then transform with a xsl file and I don't know how to resolve in it with XML, not PHP can't be add to this files. – cagoscra Nov 24 '14 at 23:17

0 Answers0