Netlify is adding a forward slash to the start of the opengraph image URLs for my portfolio website (www.chrisbarfod.design) which makes the URL invalid. I’ve checked the data on Github and there is no forward slash but when I use an opengraph debugger a forward slash has been added:
I think this is the issue as I’ve tested the debugger on my staging website on Webflow and I’m not having any problem. I’ve tried using another URL for the image but that didn’t work either.
While not entirely impossible, (as Netlify do some rewriting of site HTML files, for pretty url’s etc), it’s unlikely that Netlify is injecting the / prior to the URL.
I don’t work with Webflow so excuse my ignorance, but how are you getting the site from Webflow → Netlify, is it as already built files which are just being uploaded/deployed, or does a build run on Netlify?
If they’re pre-built files, can you inspect them to see what they contain?
If it’s a site build, can you run it locally and check the output?
I’m not sure what else it could be if not Netlify.
I built the site in Webflow, exported it and used the Udelsy Webflow → Jamstack converter, and pushed to a Github repo that Netlify deploys off.
The URL doesn’t have a forward slash before it in the files. I’ve Checked the Github repo and it’s only after I use the opengraph debug tool that a forward slash is present. This is it before:
---
title: Home
permalink: index.html
layout: index.html
slug: ''
tags: pages
seo:
noindex: false
title: Chris Barfod Design
description: Creating Intuitive and Impactful Digital Experiences
og:title: Chris Barfod Design
additional_tags: >-
<meta content="Creating Intuitive and Impactful Digital Experiences"
property="og:description"><meta content="Creating Intuitive and Impactful
Digital Experiences" property="twitter:description"><meta
content="https://uploads-ssl.webflow.com/63aa95b3e93ff8fb7d8d4cbc/661dfab369f1521b1600e2c8_OpenGraph-Home.jpg"
property="twitter:image"><meta property="og:type" content="website">
og:image: >-
https://uploads-ssl.webflow.com/63aa95b3e93ff8fb7d8d4cbc/661dfab369f1521b1600e2c8_OpenGraph-Home.jpg
twitter:title: Chris Barfod Design
---
Since it’s code from their system you should get them to fix it, but depending on your level of comfort with editing the files you can add your own fix by changing that code to the following:
I’m not sure what value is anticipated for domain, but you can mention to Udesly that the existing code only handles the og:image being hosted on the same site.
Setting a domain doesn’t make things any better, as a value like www.chrisbarfod.design, with an off-site og:image generates: