I am using %PUBLIC_URL% to load the image in index.html for meta purpose, like this
<meta property="og:image" content="%PUBLIC_URL%/image.png" />
And when inspecting the elements, I can see it is loaded in relative path inside the head.
<head>
<meta property="og:image" content="/og-image.png">
</head>
The problem is, og:image requires an absolute path as facebook debugger warned, “og:image provided is not a valid url”. So how do I get an absolute path with %PUBLIC_URL%?
For some reasons, facebook can still get the thumbnail image despite the warning. But I still want to find a way to solve this.