Show different image for WHATSAPP link sharing ?

#78236
  • Resolved Surendra.S
    Rank Math free

    Using RankMath, can I show a different image (og:image) for ‘WHATSAPP’ link sharing of a WordPress Post/Page ?

    (by default, the Featured Image shows up for both Facebook & WhatsApp URL sharing. But I would like a different image to be set for ‘WHATSAPP’ link sharing.)

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting Rank Math today.

    Using Rank math you can change the image shown in your social sharing in Rank math metabox under the Social tab.

    Facebook and Whatsapp use the same image referred using og:image and it is therefore unlikely to be possible to have different images for the two.

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Ok. Using RankMath, can I add 2 og:image tags in source code ?

    (Note: WhatsApp takes the last og:image, so if I can add 2 og:image then 1st og:image may be fetched by Facebook and 2nd og:image may be fetched by WhatsApp – when sharing the post).

    • This reply was modified 4 years, 1 month ago by Surendra.S.
    • This reply was modified 4 years, 1 month ago by Surendra.S.

    Hello,

    Thank you for the follow up.

    I am sorry but Rank math does not have such a feature. You can customize and use the following filter:

    
    /**
     * Allows developers to add images to the OpenGraph tags within the theme.
     *
     * The dynamic part of the hook name. $network, is the network slug. Can be facebook or twitter.
     *
     * @param Image The current object.
     */
    add_filter( 'rank_math/opengraph/facebook/add_additional_images', function( $image ) {
    	return $image;
    });
    

    Another option, though I wouldn’t recommend, would be to have an addition plugin handling only the opengraph images.

    Hope that helps. If you have any further question(s), please let us know. Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Show different image for WHATSAPP link sharing ?’ is closed to new replies.