If you use WordPress SEO with NextGEN gallery and have submitted a WPSEO generated sitemap to Google Webmaster tools than you have most likely run into an error with your images not being indexed properly. After some debugging I discovered that this was related to how NextGEN gallery incorrectly adds images to the WPSEO generated sitemap using a filter that the author of WPSEO (@yoast) added to his plugin.

The file located in wp-content/plugins/nextgen-gallery/lib/sitemap.php contains the bug. I supplied the NextGEN gallery support team with this patch file on July 6th (which still works as of the writing of this post). If you would prefer to simply overwrite the existing file with a patched version of the file, you can download this patched file (you will need to remove the .txt extension before uploading and overwriting the NextGEN bugged version).

Unfortunately, they’ve just been too busy to add my patch to their code.