ACF image not connecting into OG:Image

#468174
  • Resolved Jason Alward
    Rank Math free

    Hello. I’m having issues with my ACF field group. I use ACF to put in data for Rank Math. Below is this code I have for adding a 1200×630 image as a Facebook Share Image. But no matter what, I’m getting a “The ‘og:image’ property should be explicitly provided, even if a value can be inferred from other tags.” message from Facebook Debugger.

    In the code below, “social” is the group, “image” is the sub field. The image field is set to array

    add_filter( ‘rank_math/opengraph/facebook/og_image’, function( $fbimage ) {
    global $post;
    $fbimage = get_field(‘social_image’, $post->ID); /* Insert specific field here */
    return $fbimage;
    });

Viewing 16 replies (of 16 total)
  • Hello,

    The reason for the warning is that our plugin is receiving an invalid URL coming from the custom filter you have added once you disable the plugin “Customer Upload Files for WooCommerce” that is supporting the custom field social_image: https://i.rankmath.com/i/OqgkLh

    Since that is just a warning, Rank Math will ignore that and load the fallback or default image.

    Please do not hesitate to let us know if you need our assistance with anything else.

    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 16 replies (of 16 total)

The ticket ‘ACF image not connecting into OG:Image’ is closed to new replies.