The images used in the Open Graph, Rich Pin, Twitter Card, etc. meta tags are chosen in this sequence:
- An image defined in the custom Social Settings metabox Image ID or Image URL field (Pro version).
- An e-commerce product image from any supported 3rd-party plugins (Pro version).
- A featured or attached image from the WordPress Media Library or NextGEN Gallery (featured images are selected before attached images).
- An image from the NextGEN Gallery ImageBrowser (in combination with an
- A preview image from a NextGEN Gallery
- Image(s) from expanded NextGEN Gallery
- Image(s) from
<img/>HTML tags in the content text.
- NextGEN Gallery <div|a|img/> HTML tags with the ‘data-ngg-pid’ (automatically added by NGFB) or ‘data-image-id’ attribute.
- <img/> HTML tags with the ‘data-wp-pid’ (automatically added by NGFB) attribute.
- 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.
- 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.