JM Twitter Cards
Support for NextGen Gallery (3 posts)

  1. techraf
    Posted 3 years ago #

    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' );


    $id = get_post_thumbnail_id();
              if(stripos($id,'ngg-') !== false && class_exists('nggdb')){
                   $nggImage = nggdb::find_image(str_replace('ngg-','',$id));
                   $thumb = array(
                   $$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...


  2. tweetpressfr
    Plugin Author

    Posted 3 years ago #

    Thanks for reporting.

    I'll see what I can do to make it work with NGG :)

  3. tweetpressfr
    Plugin Author

    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • JM Twitter Cards
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.