Ready to get started?Download WordPress

Plugin Directory

NextGEN Gallery Optimizer

Improves your site's page load speed by preventing NextGEN's scripts & css from loading on posts without galleries.

NextGEN Gallery Optimizer

Improves your site's page load speed by ensuring NextGEN Gallery's scripts and styles ONLY load on posts with the [nggallery id=x] shortcode.

It also includes and automatically-integrates the fantastic Fancybox lightbox script, so now you can have gorgeous galleries AND a speedy site! *Requires NextGEN Gallery 1.6.2 and up.

Please note: The basic version currently only supports the popular [nggallery id=x] shortcode and thus, will not load the extra scripts required for slideshows to function. If you require slideshow support, please consider downloading the Premium version...

NextGEN Gallery Optimizer *Premium*

Builds on the basic version and adds support for ALL TEN of NextGen's shortcodes including [nggallery id=x], [slideshow id=x], [album id=x], [thumb id=x], [singlepic id=x], [imagebrowser id=x], [nggtags gallery|album=mytag], [random max=x], [recent max=x] and [tagcloud].

It also adds support for the [Show as slideshow] link (loading slideshow scripts only after a user clicks-through), precision targeting for shortcode SUB-pages (ensuring we only load the scripts we need on each view), support for JW Image Rotator for stylish slideshows, support for AJAX pagination on [imagebrowser id=x] and now, features an attractive effect that resizes Fancybox when the browser window is resized.

This Premium version is available from the plugin settings page, or can be downloaded here.

If you have any questions, suggestions, ideas or feedback, please email me at mark@markstechnologynews.com

Key features:

  1. Improves your WordPress page load speed!
  2. Prevents NextGEN's scripts and styles from loading on posts without galleries.
  3. Lets you easily install the Fancybox lightbox to display your images in style.

NEW in Version 1.1.2:

  1. Tested compatible with WordPress 3.5 (Basic and Premium)
  2. Latest Google-hosted jQuery 1.8.3 to match new WP version (Basic and Premium)
  3. New admin notifications to assist with NextGEN installation (Basic and Premium)
  4. Improvements to Optimizer's automatic Fancybox installation (Basic and Premium)

This release brings us up to date with WordPress 3.5, and features a number of additions and refinements to improve user experience. These include new admin notifications to assist users who don't have the required NextGEN Gallery plugin installed and activated, new step-by-step installation instructions via the WordPress admin (to ensure the correct file ownership and permissions are set), a streamlined settings page, and improvements to Optimizer's automatic Fancybox installation.

NEW in Version 1.1.1:

  1. Dynamic messaging for admins on unsupported shortcodes (Basic)
  2. Checks to ensure jQuery isn't being deregistered (Basic and Premium)
  3. Includes blank index.php files for enhanced security (Basic and Premium)

This release aims to improve communication between Optimizer and end-users, including dynamic messaging for admins on unsupported shortcodes, and a clever regex that detects and alerts you if your theme (or child-theme) is deregistering jQuery...which causes Fancybox to break. Additionally, security is enhanced with the addition of blank index.php files in each folder, preventing bots from scanning your server's directory tree.

NEW in Version 1.1 (first major release):

  1. Fancybox title now included in image height calculations (Basic and Premium)
  2. New options: WordPress's included jQuery or go Google-hosted (Basic and Premium)
  3. Support for the Thickbox effect (Basic and Premium)
  4. Support for the Shutter effect (Basic and Premium)
  5. Support for JW Image Rotator slideshow integration (Premium)
  6. Support for AJAX pagination on [imagebrowser id=x] (reqs. Shutter) (Premium)
  7. Fancybox gets extra fancy...auto-resizes when the browser is resized (Premium)

This first major release for Optimizer sees a number of new additions and features... Fancybox now includes space for a single-line title in its image height calculations, vastly improving vertical alignment of the lightbox. Also, Optimizer now lets you choose between using WordPress's included jQuery (for greater compatibility), or the Google-hosted version (for faster page loads). Support for the Thickbox and Shutter effects has also been added thanks to user requests.

On top of this, the Premium version now includes AJAX pagination when using Shutter on the [imagebrowser id=x] shortcode, supports the JW Image Rotator for slideshows and features a super-fancy, auto-resize function that resizes Fancybox when the browser window is resized!

NEW in Version 1.0.8:

  1. Tested fully-compatible with WordPress 3.4 (Basic and Premium)
  2. Improved compatibility with other plugins and themes (Basic and Premium)
  3. Display fix for Fancybox when no title is available (Basic and Premium)
  4. Latest jQuery 1.7.2 (Basic and Premium)

This version adds the jQuery.noConflict(); method for improved compatibility with plugins and themes using other javascript libraries/frameworks including script.aculo.us, Prototype and MooTools. It also includes a fix for Fancybox/NextGEN Gallery integration where a small white line would appear underneath the lightbox when no title was set.

NEW in Version 1.0.7:

  1. Improved compatibility with other scripts and plugins. (Basic and Premium)
  2. Minor bug fix in admin message. (Basic and Premium)

This version enhances compatibility with other plugins and includes a few minor improvements.

NEW in Version 1.0.6:

  1. Fully-automated Fancybox installation! (Basic and Premium)

This version features completely automated Fancybox integration with NextGEN Gallery, so now you can be up and running even faster.

NEW in Version 1.0.5:

  1. Precision matching with WordPress's built-in shortcode finder.
  2. NextGEN Gallery Optimizer Premium (an optional upgrade for a small donation).

This version uses WordPress's native get_shortcode_regex() function for EXACT shortcode matching, ensuring scripts and styles don't load unexpectedly unless the FULL shortcode is present. If WordPress doesn't detect a shortcode, neither do we!

Also, this update introduces the new NextGEN Gallery Optimizer Premium version, which adds support for ALL TEN of NextGen's shortcodes, support for the [show as slideshow] link, the removal of NextGEN's version number comment and more.

NEW in Version 1.0.4:

  1. Easier set up

This version automatically redirects first time users to the options page on activation and sets a default stylesheet for easier set up.

NEW in Version 1.0.3:

  1. Optimized code for better compatibility and page load speed
  2. Improved settings page

This update results in faster page loads on gallery pages by avoiding duplicate scripts. It reduces the chance of conflicts with other plugins and makes setting up Fancybox even easier.

NEW in Version 1.0.2:

  1. Support for WordPress Pages
  2. Fancybox overlap fix
  3. Fix for Fancybox not working in IE6 & IE8
  4. Latest JQuery

This update lets you display galleries on both Posts AND Pages in style, but only load code when they're present.

It also fixes an issue where some page elements overlap Fancybox and prevent the close button from functioning (in particular the title text, header image and menu bar in Twenty Eleven).

It fixes the "Fancybox not working in IE6 & IE8" issue by automatically updating the Fancybox stylesheet to use the correct file paths, and we're now running Fancybox on JQuery version 1.7.1, resulting in faster page loads where galleries are present.

Requires: 3.1.2 or higher
Compatible up to: 3.5.2
Last Updated: 2013-1-2
Downloads: 151,926


3 stars
3.4 out of 5 stars


0 of 3 support threads in the last two months have been resolved.

Got something to say? Need help?


Not enough data

1 person says it works.
1 person says it's broken.

100,1,1 40,5,2 0,1,0 50,2,1
100,1,1 33,3,1
29,7,2 60,5,3 100,1,1
67,3,2 50,4,2