skip to Main Content

I used to have my website hosted through Shopify, and when I linked to it in my LinkedIn job description the logo showed up. I’ve since moved my website to GitHub Pages, and now the logo is blank when I link to it in LinkedIn (or anywhere else for that matter). Is there something I can do to fix this, or is it just a con of GH Pages?

enter image description here

2

Answers


  1. It always helps to include a link to the codebase for reference, but it looks like you’re likely working with this repo on your GitHub profile.

    It’s possible that Shopify or a theme you were using before included these by default, but typically you have to specify the preview image in your site’s metadata. The preview images for formatted links are pulled from an Open Graph image property, which you define in a meta tag in your HTML’s <head> section (see the OG documentation here). So, in your head include file, you’d add a meta tag like this:

    <meta property="og:image" content="https://graemeharrison.com/assets/img/logo.png" />
    

    Then, ideally, you’ll include this head file in each layout file so that it’s included in each page’s HTML.

    Login or Signup to reply.
  2. A couple of things that worked for me:

    Put your image in your ‘public’ directory near index.html, and in your meta tag retrieve it with content="http://yourdomain.com/yourimage.png&quot;. (https didn’t work for me but http did)

    Also, https://www.linkedin.com/post-inspector is a good tool to check your og image appears.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search