The og:image doesn’t show up in the source code of our site

#468407
  • Resolved pdtasktrack
    Rank Math free

    Hi,

    I have a custom filter for generating overlay image for the og:image (opengraph image), but it’s not working anymore, although before it was working.

    I am using the following filter:

    add_filter( “rank_math/opengraph/facebook/image”, function( $attachment_url ) {
    global $post;

    return $attachment_url = get_template_directory_uri() . ‘/generate-og-image.php?p=’ . $post->ID;
    });

    When i disable this filter the og:image appears in the source code, of a page in the site, but when i use this filter it doesn’t show anymore.

    What i am doing wrong? Can you please check it?

    Thank you,
    Munteanu Ramiro

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

    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.

    Hi,

    Please give me your email address, so i can create this temporary login with the plugin that you mentioned (https://wordpress.org/plugins/temporary-login-without-password/)

    Regards,
    Ramiro

    Hello,

    You can add s******@r*********** as email address.

    Thank you.

    Here it is the temporary Login URL:
    [moved to sensitive data section]

    Hello,

    Our plugin doesn’t seem to accept the type of path or the structure of the URL you have provided. You may need to go to our plugin files and comment the line 249-251. This will bypass the checking of the path and the og:image tag should appear on the view source of the page.

    og

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hi,

    Yes, but can you point to me which file exactly from your plugin do i need to update in the way you mentioned?

    Regards,
    Ramiro

    Hello,

    Please try visiting the path: /wp-content/plugins/seo-by-rank-math/includes/opengraph, open the file named class-image.php, and comment the line 249-251 just as my colleague mentioned above.

    Please be advised that updating Rank Math plugin on your site may revert any changes you made. Therefore, you may need to make changes again after you update Rank Math.

    Hope that helps, and please do not hesitate to let us know if you need our assistance with anything else.

    Thank you.

    Hi,

    That seems to work now.

    Thank you for your support.

    Regards,
    Ramiro

    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 9 replies - 1 through 9 (of 9 total)

You must be logged in to reply to this ticket.