Broken images in social networks

#459690
  • Resolved avecesveoviajes
    Rank Math free

    Hello, it’s been a while since when I post on facebook and twitter, the images appear broken. I have configured Rank Math many times but I can’t solve the problem.

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

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    I’ve checked the affected URL you’ve shared with us and it seems to be there’s no og:image tag present in your source code. Which is why Facebook is picking up the image from your page randomly.

    Can you please confirm if you’ve set the og:image correctly? Please try visiting the URL below to learn how you can add them properly:
    https://rankmath.com/kb/open-graph-image-not-displaying/

    If the issue still persists, then we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.

    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    Looking forward to helping you.

    Thank you.

    ​​​​​​​

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    I’ve have tried login to your site using the URL you’ve shared, but I encountered 502 Bad Gateway error. I’ve attached a screenshot in the sensitive data section for your reference.

    As Our team is distributed around the world, please disable the restriction for the country Portugal, Bangladesh, India, and the Philippines. So that we can troubleshoot the issue for you and provide you a solution.

    Looking forward to helping you.

    Thank you.

    Ok, done. The changes you make may take a few minutes to take effect. Thank you very much.

    Hello,

    Checking your settings, you didn’t seem to set any image for your Opengraph image as your default image. Please refer to my screenshot below:

    screenshot

    Please head over to your WordPress Dashboard > Rank Math > Titles & Tools > Global Meta and set the default image there.

    Your homepage should automatically use that.

    Looking forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Ok, I have done what you tell me. but now the Open Graph image appears in the posts instead of the featured image. I attach a screenshot of Facebook Debugger where you can see that instead of the featured image of the post the Open Graph image appears (in the sensitive data). Thanks.

    Add: In Facebook Debugger in other posts the featured image does NOT appear, but another one from the same post that is not the featured one. I attach another screenshot.

    Hello,

    To force og:image property to use the featured image from a post, please try adding the filter below to achieve that:

    
    add_filter( "rank_math/opengraph/facebook/image", function( $attachment_url ) {
    	global $post;
    	
    	if (get_the_post_thumbnail_url($post->ID)) {
    		$attachment_url = get_the_post_thumbnail_url($post->ID);
    	}
    	
    	return $attachment_url;
    });
    
    add_filter( "rank_math/opengraph/twitter/image", function( $attachment_url ) {
    	global $post;
    	
    	if (get_the_post_thumbnail_url($post->ID)) {
    		$attachment_url = get_the_post_thumbnail_url($post->ID);
    	}
    	
    	return $attachment_url;
    });
    

    To learn how you can add filter/hook to your WordPress site, please follow the URL I’ve shared below:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    okay. Fixed. Thank you very much. You have truly exceptional customer service. Kind regards from Spain.

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

You must be logged in to reply to this ticket.