Hi all,
This is a new issue based on a discussion from https://github.com/PiranhaCMS/piranha.core/issues/1312.
Is seems that the AbsoluteContentUrl function doesn't produce the correct output for the og:image tag rendered from the PiranhaHtmlExtensions class.
As @StephenWRogers mentioned in #1312 :
It looks to me like
AbsoluteUrlStart will be
https://<-siteurl->
and ContentUrl will be
https://<-image blob url->
which AbsoluteContentUrl appends together
In my case the og:image is produced as:
http://localhost:5000https://xxx.s3.eu-west-1.amazonaws.com/xxx.jpg
For now I have overwritten the public static HtmlString MetaTags method locally for a quick fix, all I had to do was change
sb.AppendLine($"<meta property=\"og:image\" content=\"{ app.AbsoluteContentUrl(content.OgImage) }\">");
to:
sb.AppendLine ($"<meta property=\"og:image\" content=\"{app.ContentUrl (content.OgImage)}\">");
I'm experiencing the same issue.
<meta name="og:image" value="http://geekcafe.comhttps://cdn-media.geekcafe.com/799a39f6-adf7-4136-8a23-989b13be9a03/bird-s-eye-view-photography-of-lighted-city-3573383.jpg">
So the issue here is that the helper method assumes that the ContentUrl is a relative url, since this is what the FileStorage provider produces, but since external storage providers (like BlobStorage) always produces an absolute url. The solution here would be to check if the ContentUrl starts with http or not.
This has now been fixed in master and will be released in SR 1
Thanks @tidyui !
Most helpful comment
This has now been fixed in master and will be released in
SR 1