Hello,
We apologize for the issue you are facing with the og:image:alt
tag on your site when sharing on LinkedIn. Unfortunately, there is no direct option in Rank Math to disable the og:image:alt
tag specifically. However, you can customize the Open Graph tags using filters in your theme’s functions.php
file.
If you want to remove or modify the og:image:alt
tag, you can use the following code snippet:
add_filter( 'rank_math/opengraph/facebook/og_image_alt', function( $content ) {
return ''; // Return an empty string to disable the og:image:alt tag
});
This code will effectively remove the og:image:alt
tag from being outputted. Please ensure to back up your site before making any changes to the code.
If you need further assistance or if this does not resolve your issue, please reply to this ticket, and a human agent from our support team will be happy to help you further.
Thank you for raising this concern!
Sources:
Open Graph Meta Tags » Rank Math
I was a bit hasty. It isn’t the og:image:alt but ‘name’ from the breadcrumbs schema.org that LinkedIn is using as title.
Hello,
We have replied to your query from another ticket, but please note that LinkedIn prioritizes the oEmbed code instead of the Open Graph meta tags.
Rank Math already adds the og:title
in the source code, where social apps use to fetch the title shown.
Looking forward to helping 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.