jonasmerlin / astro-seo

Makes it easy to add information that is relevant for SEO to your Astro app.
MIT License
908 stars 50 forks source link

OpenGraph Image Missing `name=image` Property Causes Image Not Loading #88

Closed arimgibson closed 5 months ago

arimgibson commented 5 months ago

Sites using OpenGraph wouldn't recognize my image and I wasn't sure why. Used LinkedIn's Post Inspector tool which mentions a name=image property on the og:image meta tag. Using the extend functionality to create this meta tag myself fixed the issue. It's strange because OpenGraph's docs don't indicate this being required...

I'm happy to PR but wanted to submit this as a bug first.

You can serve this repro with ngrok to paste the link into the Post Inspector. Visit src/layouts/Base.astro and swap out my old ngrok URL with yours. And make sure to use the same commit as linked! https://github.com/ari-gibson-consulting-llc/brielle-french-design/tree/8a05ec2ffcf372c2841f0ca416c0273cadae6626

jonasmerlin commented 5 months ago

Hey @arimgibson, thank's for your report! I tried to serve your repro, but when running npm start I get an error saying that the contentful accessToken is expected. Therefore, it would be great if you could submit a PR for me to merge for the next version.

arimgibson commented 5 months ago

My bad @jonasmerlin ; didn't realize that'd be an issue! But yes I can just PR and show before and after in images, unless you want an MRE as well

jonasmerlin commented 5 months ago

@arimgibson No worries. And just do what you have the time and energy for. I believe you that it's an issue, so images would be more than enough imo.

arimgibson commented 5 months ago

@arimgibson No worries. And just do what you have the time and energy for. I believe you that it's an issue, so images would be more than enough imo.

Deal, thank you! Appreciate lowering the effort required for those contributions... works nicely with repos this size :smile: should see this weekend

arimgibson commented 5 months ago

Sorry for the delay @jonasmerlin , just went to complete this and now I can't seem to replicate :thinking: not sure what changed. Also strange that it wasn't reported already if it was actually happening. Going to close but will letcha know if it comes up again I guess!