How does WPSSO Core find / detect / select images?

The images used in the Open Graph, Rich Pin, Twitter Card meta tags and Schema markup are chosen in this sequence:

  1. An image defined in the custom Document SSO (Social and Search Optimization) metabox Image ID or Image URL field (Premium version).
  2. An e-commerce product image from a supported 3rd-party plugin like Easy Digital Downloads, WooCommerce, WP eCommerce, etc. (Premium version).
  3. A featured or attached image from the WordPress Media Library or NextGEN Gallery. Featured images are selected before other attached images.
  4. An image from the NextGEN Gallery ImageBrowser in combination with an nggalbum or nggallery shortcode (Premium version).
  5. A preview image from a NextGEN Gallery nggalbum or nggallery shortcode (Premium 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 WPSSO Core) or ‘data-image-id’ attribute (Premium version).
    2. <img/> HTML tags with the ‘data-wp-pid‘ (automatically added by WPSSO Core) attribute for media Library Images.
    3. Any other <img/> HTML tag with a ‘data-lazy-src’ or ‘src’ attribute.
  8. A default / fallback image defined on the SSO General settings page.

Most of these methods will lead to a properly sized image with 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 resized / smaller versions as required. If an original image is smaller than the required image dimensions, it may be ignored by the plugin – so always upload the largest images possible.

See the Setup Guide for additional information on image related settings.

See why you shouldn’t upload small images to the Media library.