• When featured image of a post was taken from NextGen Gallery, this plugin returned an empty string in twitter:image property.

    I managed to get it working (per this article) by replacing:

    $thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'medium' );

    with:

    $id = get_post_thumbnail_id();
              if(stripos($id,'ngg-') !== false && class_exists('nggdb')){
                   $nggImage = nggdb::find_image(str_replace('ngg-','',$id));
                   $thumb = array(
                        $nggImage->imageURL,
                        $nggImage->width,
                        $nggImage->height
                   );
              }else{
                   $$humb = wp_get_attachment_image_src($id,'full', true);
              }

    Would you consider adding this to your plugin for future?

    It would require a bit more work for gallery cards, I guess…

    https://www.ads-software.com/extend/plugins/jm-twitter-cards/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Anonymous User 10765487

    (@anonymized-10765487)

    Thanks for reporting.

    I’ll see what I can do to make it work with NGG ??

    Anonymous User 10765487

    (@anonymized-10765487)

    I’ve been running some tests. Dude this does not come from my plugin but from NGG itself !

    So thanks for the tip but I wonder if it’s really a good idea to include such an hack to my plugin. I mean this is more logical NGG fix that bug and then we’ll see if it works with my plugin.

    Once again, thanks for sharing this tip. It will help people in the same case.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Support for NextGen Gallery’ is closed to new replies.