open graph image url with jetpack

#27609
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.

    Would you mind sharing a link to the affected page so that we can investigate this issue further?

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hello,

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

    I have inspected the page in question and it contains duplicate OG meta meta tags. Could you please try to identify the plugin that is adding the additional tags by performing these steps:
    https://rankmath.com/kb/check-plugin-conflicts/

    Looking forward to helping you. Thank you.

    ​​​​​​​

    I just follow your link to test Theme/Plugin Conflict With RankMath

    and when i enabled just jetpack and Rank Math

    i see the same pb in the url twitter meta

    there a un pb with jetpack and your plugin jetpack is more important than rankmath for me with the CDN photon

    • This reply was modified 4 years, 3 months ago by Todd.
    • This reply was modified 4 years, 3 months ago by Todd. Reason: removed HTML code of an entire page
    Todd
    Rank Math free

    Hello,

    The problem is caused by Jetpack since it is adding an incorrect og:image to your posts. Please disable the OpenGraph tags in JetPack and please avoid pasting the entire code here. We can check your page’s source from just the URL.

    Thank you.

    with SEOPress et Yoast SEO here’s what I’m getting

    <meta property=”og:image:secure_url” content=”https://i1.wp.com/lesalpinistes.com/wp-content/uploads/2020/01/Championnat-du-mone-rallye-1973-Alpine-A110-Thérier-Darniche-Piot-Nicolas-lesalpinistes.jpeg?fit=1600%2C1066&ssl=1″&gt;

    it’s the true url

    could you fix your plugin or give me a filter for my functions.php theme

    Hello,

    I add this to my functions.php and nothing, same pb
    add_filter( ‘jetpack_enable_open_graph’, ‘__return_false’ );
    https://jetpack.com/2013/05/03/remove-open-graph-meta-tags/

    https://lesalpinistes.com/championnat-du-monde-des-rallyes-1973-le-triomphe-dalpine/

    Hello,

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

    You can also make use of the following filter on your theme’s functions.php file to modify the og:image:

    /**
     * Allows developers to change the OpenGraph image within theme.
     *
     * The dynamic part of the hook name. $network, is the network slug. Can be facebook or twitter.
     *
     * @param string $attachment_url The image we are about to add.
     */
    add_filter( "rank_math/opengraph/{$network}/image", function( $attachment_url ) {
    	return $attachment_url;
    });

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Oh thank you !!!! it’s work

    this is my hot fix

    he check if jetpack and Site Accelerator (Formerly Photon) are enabled
    and add ‘?ssl=1’ to the picture url
    else return default attachment_url

    /**
     * Allows developers to change the OpenGraph image within theme.
     *
     * The dynamic part of the hook name. $network, is the network slug. Can be facebook or twitter.
     *
     * @param string $attachment_url The image we are about to add.
     */
    add_filter( 'rank_math/opengraph/facebook/image', function($attachment_url ) {
        $image = $attachment_url;
        if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) {
            $image = $attachment_url. '?ssl=1';
        }
        return $image;
    });
    add_filter( 'rank_math/opengraph/twitter/image', function($attachment_url ) {
        $image = $attachment_url;
        if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'photon' ) ) {
            $image = $attachment_url. '?ssl=1';
        }
        return $image;
    });

    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/?rate=5#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)

The ticket ‘open graph image url with jetpack’ is closed to new replies.