Facebook no image


#1

Hi Vlad,

Facebook can’t seem to pick up an image from my site. I’ve tried adding another slider image, a header image and the code snippet below and nothing seems to be working. I’m also fetching new scrape information from Facebook’s open graph object debugger.

function jeherve_custom_image( $media, $post_id, $args ) {
if ( $media ) {
return $media;
} else {
$permalink = get_permalink( $post_id );
$url = apply_filters( ‘jetpack_photon_url’, ‘YOUR_LOGO_IMG_URL’ );

    return array( array(
        'type'  => 'image',
        'from'  => 'custom_fallback',
        'src'   => esc_url( $url ),
        'href'  => $permalink,
    ) );
}

}
add_filter( ‘jetpack_images_get_images’, ‘jeherve_custom_image’, 10, 3 );

Appreciate your help.

Thanks,
Ruby


#2

Here’s the link to my site:
http://movemankind.com/


#3

Hi,

I’m not really sure but it could be because you don’t have an actual image on your page. Just a background image.
Looking at your source, this is the og:image you have now: https://s0.wp.com/i/blank.jpg


#4

Yeh, I see that too and can’t seem to get rid of it…

Thanks anyways!


#5

Hi Vlad,

I’m just wondering if my child theme’s functions.php is working properly…
Is this the right code?

<?php
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
wp_enqueue_style( ‘child-style’,
get_stylesheet_directory_uri() . ‘/style.css’,
array(‘parent-style’)
);
}
?>

Thank you!


#6

Hi Vlad,

Apologies, another question. I’ve been reading Jetpack’s advice and I was wondering whether Athemes manages Open Graph meta tags and if so, how could I/or could you help me remove the data?

Thank you!


#7

You don’t need this part, it will just cause the child stylesheet to load twice:


wp_enqueue_style( ‘child-style’,get_stylesheet_directory_uri() . ‘/style.css’,array(‘parent-style’) );

No, we don’t do anything regarding Open Graph in Sydney or any other theme. As far as I know that’s not even allowed in wordpress.org hosted themes.


#8

I see, thanks a lot Vlad!

An image is showing now for some reason…