How does NGFB find / detect / select images?

The images used in the Open Graph, Rich Pin, Twitter Card, etc. meta tags are chosen in this sequence:

  1. An image defined in the custom Social Settings metabox Image ID or Image URL field (Pro version).
  2. An e-commerce product image from any of the supported 3rd-party plugins (Pro version).
  3. A featured or attached image from the WordPress Media Library or NextGEN Gallery v2.x. Featured images are selected before attached images and NextGEN Gallery v1.x images are supported in the Pro version (requires additional media integration features).
  4. An image from the NextGEN Gallery ImageBrowser, in combination with an nggalbum or nggallery shortcode (Pro version).
  5. A preview image from a NextGEN Gallery nggalbum or nggallery shortcode (Pro version).
  6. Image(s) from expanded NextGEN Gallery singlepic, nggallery, nggtags or ngg_images shortcodes.
  7. Image(s) from <img/> HTML tags in the content text.
    1. NextGEN Gallery <div|a|img/> HTML tags with the ‘data-ngg-pid‘ (automatically added by NGFB) or ‘data-image-id’ attribute (Pro version).
    2. <img/> HTML tags with the ‘data-wp-pid‘ (automatically added by NGFB) attribute for Media Library images.
    3. Any other <img/> HTML tag with a ‘src’ attribute (and using the image URL, it also tries to use pre-v2 NextGEN Gallery image IDs). If no image ID can be determined, then the ‘width’ and ‘height’ attributes must be present, and larger than the image dimensions chosen in the plugin settings.
  8. A default / fallback image defined on the NGFB General settings page.

All of these methods will lead to a properly sized image of the correct dimensions (since the image ID can be determined), provided the original image is large enough. Always upload the largest images you can to the Media Library and/or NextGEN Gallery, and let WordPress create the re-sized / smaller versions as required. If an original image is smaller than the required Image Dimensions, it will be ignored by the plugin – so always upload the largest images possible.

A Note About Image Dimensions

NGFB provides several Image Dimension options, depending on the intended use for the image (Open Graph meta tags, various Twitter Card formats, etc.). The Image Dimensions should always be chosen for their intended use. For example, Open Graph meta tags are read by Facebook, Google+, LinkedIn, and others (Pinterest has its own Image Dimensions options). Facebook has published a preference for images measuring 1200x630px, but horizontally cropped images may not show as well on other social websites. A good compromise for your Open Graph Image Dimensions is 1200x1200px cropped. If you use these dimensions, make sure your original images are at least 1200px in both width and height.

Leave a Reply

Your email address will not be published. Required fields are marked *