Skip to main content
Participant
September 28, 2024
Answered

Choose the photo for the Facebook preview

  • September 28, 2024
  • 1 reply
  • 248 views

Hopefully I'm wording this correctly.

 

I have a very simple site for automotive repairs and upgrades. The crude coding works well enough for my needs, so please don't laugh at it. If I post a link on Facebook (or similar social media sites) the link shows a preview for that page but instead of showing the first photo at the top of the page, it shows one from much further down.

 

How can I get it to show the "correct" one? Here's a link to the misbehaving page:  5-Speed Transmssion Swap (ace240z.com)

 

Thank you.

    This topic has been closed for replies.
    Correct answer Nancy OShea

    Use Open Graph meta tags inside the <head> of your document(s).

    https://developers.facebook.com/docs/sharing/webmasters

     

    Example:

    <meta property="og:url" content="https://ace240z.com/transmission-swap.html"/>
    <meta property="og:type" content="article" />
    <meta property="og:title" content="Swapping a transmission" />
    <meta property="og:description" content="Put a 5-speed transmission into your 240z" />
    <meta property="og:image" content="https://ace240z.com/images/Ace_240z__Transmission.jpg" />
    <meta property="og:width" content="600" />
    <meta property="og:height" content="600" />

    Width & height are in pixels. FB recommends using square, 1:1 aspect ratio images, no less than 600 pixels wide.

     

    NOTES: 

    1.  It's important to rename your files without special characters and spaces.  Underscores _ or hyphens - are acceptable. Spaces & special characters (&^%$#) are reserved for programming instructions and should never be used in file names.

     

    2.  You have numerous code validation errors that need attention.  See details below.

    https://validator.w3.org/check?uri=http%3A%2F%2Face240z.com%2Ftransmission-swap.html&charset=%28detect+automatically%29&doctype=Inline&group=0

     

    3. Your site should have an HTTPS protocol.  Ask your hosting provider for details on how to force your URL to resolve to the secure server.   See results from Why No Padlock below.

    https://www.whynopadlock.com/results/12b7129b-2dbe-48c4-a881-cd54efcb4505

     

    Hope that helps.

     

    1 reply

    Nancy OShea
    Community Expert
    Nancy OSheaCommunity ExpertCorrect answer
    Community Expert
    September 28, 2024

    Use Open Graph meta tags inside the <head> of your document(s).

    https://developers.facebook.com/docs/sharing/webmasters

     

    Example:

    <meta property="og:url" content="https://ace240z.com/transmission-swap.html"/>
    <meta property="og:type" content="article" />
    <meta property="og:title" content="Swapping a transmission" />
    <meta property="og:description" content="Put a 5-speed transmission into your 240z" />
    <meta property="og:image" content="https://ace240z.com/images/Ace_240z__Transmission.jpg" />
    <meta property="og:width" content="600" />
    <meta property="og:height" content="600" />

    Width & height are in pixels. FB recommends using square, 1:1 aspect ratio images, no less than 600 pixels wide.

     

    NOTES: 

    1.  It's important to rename your files without special characters and spaces.  Underscores _ or hyphens - are acceptable. Spaces & special characters (&^%$#) are reserved for programming instructions and should never be used in file names.

     

    2.  You have numerous code validation errors that need attention.  See details below.

    https://validator.w3.org/check?uri=http%3A%2F%2Face240z.com%2Ftransmission-swap.html&charset=%28detect+automatically%29&doctype=Inline&group=0

     

    3. Your site should have an HTTPS protocol.  Ask your hosting provider for details on how to force your URL to resolve to the secure server.   See results from Why No Padlock below.

    https://www.whynopadlock.com/results/12b7129b-2dbe-48c4-a881-cd54efcb4505

     

    Hope that helps.

     

    Nancy O'Shea— Product User & Community Expert
    Acemon99Author
    Participant
    September 28, 2024
    Thank you very, very much. Shame on me for not running the validator.