Saving base64 encoded image for sharing facebook via PHP

I have a thumbnail of an image encoded as base64 that I want to use as the default thumbnail when sharing the page via Facebook. Facebook does not seem to support using base64 images directly, so I need to make / save / decode (?) It first before the user can click the Share button. Any thoughts?

Here is my thumbnail:

$thumbnail = '<img src="data:image/jpg;base64,' . $thumbnail_src . '" />';

Obviously, it displays perfectly in the browser, but Facebook cannot “get” it.

+3
source share
2 answers

I finished decoding the image and entered it in a temporary directory.

+1
source

GD. php, , Facebook .

+1

All Articles