• Resolved Juan

    (@cybnet)


    I’m having a problem with og:image only filled up if image in the post content HTML, if not, default image is used even if the post has thumbnail.

    I’ve tried with all other plugins deactivated and a default theme and the problem persists.

    I’ve even tried this filter:

    add_filter( 'jetpack_images_get_images', 'jetpack_custom_image', 10, 3 );
    function jetpack_custom_image( $media, $post_id, $args ) {
    
        if ( has_post_thumbnail( $post_id ) ) {
    
            var_dump($media);
    
        }
    
        return $media;	
    
    }

    And it prints array(0){}, so has_post_thumbnail( $post_id ) returns true.

    https://ww.wp.xz.cn/plugins/jetpack/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Juan

    (@cybnet)

    It seems that the post thumbnail need a minimun width and height, can be that the problem?

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    the post thumbnail need a minimun width and height,

    That’s correct. An image has to be at least 200×200 pixels to be used by Facebook.

    Could you post a link to one of the posts where you experience issues, so I can have a look?

    If you want your site URL to remain private, you can also contact us via this contact form:
    http://jetpack.me/contact-support/

    Thread Starter Juan

    (@cybnet)

    I’m not talking about facebook, I’m talking about the og:image tag by JetPack. As I said, JetPack uses default blank image for posts with thumbnail attached. The problem exists with two posts; the thumbnails sizes in both cases are 932 × 188. I’ve tried with a bigger image and the problem is fixed.

    So, is jetpack checking the image dimensions before generating the og:image tag?

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    I’m not talking about facebook, I’m talking about the og:image tag by JetPack.
    […]
    So, is jetpack checking the image dimensions before generating the og:image tag?

    Since the Open Graph Meta Tags are used by Facebook, Jetpack respects Facebook’s requirements when outputting Open Graph Meta Tags. If your image is too small, it won’t appear in the Open Graph Meta Tags.

    Thread Starter Juan

    (@cybnet)

    That answer the question. Thank you very much.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Missing og:image on post with thumbnail’ is closed to new replies.