NextGEN Gallery Optimizer Now Discontinued

Due to the major breaking changes set to be introduced with the Gutenberg editor in WordPress v5.0, NextGEN Gallery Optimizer has now been discontinued.

Valid license holders for Optimizer Pro will continue to receive support if required, but the product has now been removed from sale, in preparation for the release.

I want to say a big thank you to everyone who's enjoyed using the plugin to optimize their sites over the last six and a half years, and wish you all the best for the future.

Kind regards,
Mark.

NextGEN Gallery Optimizer Documentation

Configuration (NextGEN Gallery v2.0)

Configuration guide

NextGEN Gallery Optimizer is largely ready to go out of the box, with most features automatically installed and integrated immediately upon activation.

If you'd like to customize the settings, and/or set up Optimizer Pro's NextGEN Gallery Deactivator feature, please navigate to Settings -> NextGEN Gallery Optimizer Basic/Pro in your WordPress admin.

We'll do a breakdown of each setting below, so you know exactly how everything works.

Option 1. Optimize the front-end?

This option removes NextGEN's unused scripts and stylesheets from non-gallery pages, to speed up your site.

This is active by default.

Option 2. Optimize the admin?

This option prevents NextGEN's scripts and stylesheets from loading on every page of the admin, for faster administration.

Again, this is active by default, and removes all of NextGEN's scripts and stylesheets from non-NextGEN admin pages (excluding post and page editor screens as it requires them for its Attach to Post feature).

Option 3. Remove "lightbox_context.js"?

Removes the following script:

<script type='text/javascript' src='http://www.yoursite.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/lightbox/static/lightbox_context.js'></script>

Optimizer's "Enhanced Fancybox Lightbox" or "No Lightbox" must be selected, as all other built-in lightboxes require this as a dependency.

Option 4. Remove "common.js" and its 1.5KB inline CDATA block?

Removes the following script and CDATA block:

<script type="text/javascript"> /* <![CDATA[ */ var galleries = {}; galleries.gallery_f818929397c91218e673aa8eb9724b39 = {"id":null,"source":"galleries","container_ids":["1"],"album_ids":[],"tag_ids":[],"display_type":"photocrati-nextgen_basic_thumbnails","exclusions":[],"order_by":"sortorder","order_direction":"ASC","image_ids":[],"entity_ids":[],"tagcloud":false,"inner_content":"","returns":"included","slug":null,"display_settings":{"override_thumbnail_settings":"0","thumbnail_width":"120","thumbnail_height":"90","thumbnail_crop":"1","images_per_page":"2","number_of_columns":"0","ajax_pagination":"1","show_all_in_lightbox":"0","use_imagebrowser_effect":"0","show_piclens_link":"0","piclens_link_text":"[Show PicLens]","show_slideshow_link":"1","slideshow_link_text":"[Show slideshow]","template":"var\www\yoursite.com\wp-content\plugins\nextgen-gallery\products\photocrati_nextgen\modules\ngglegacy\view\gallery.php","use_lightbox_effect":true,"display_no_images_error":1,"disable_pagination":0,"thumbnail_quality":"100","thumbnail_watermark":0,"ngg_triggers_display":"never"},"excluded_container_ids":[],"sortorder":[],"maximum_entity_count":"500","_errors":[],"transient_id":"f818929397c91218e673aa8eb9724b39","ID":"f818929397c91218e673aa8eb9724b39"};var nextgen_lightbox_settings = {"static_path":"http:\/\/www.yoursite.com\/wp-content\/plugins\/nextgen-gallery\/products\/photocrati_nextgen\/modules\/lightbox\/static","context":"nextgen_images"}; /* ]]> */ </script>

<script type='text/javascript' src='http://www.yoursite.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/static/common.js'></script>

Again, Optimizer's "Enhanced Fancybox Lightbox" or "No Lightbox" must be selected, as all other built-in lightboxes require this as a dependency.

Option 5. Remove "ajax.js" and its "photocrati_ajax" CDATA block?

Removes the following script and CDATA block:

<script type="text/javascript"> /* <![CDATA[ */ var photocrati_ajax = {"url":"http:\/\/www.yoursite.com\/photocrati_ajax","wp_site_url":"http:\/\/www.yoursite.com", "wp_site_static_url":"http:\/\/www.yoursite.com"}; /* ]]> */ </script>

<script type='text/javascript' src='http://www.yoursite.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ajax/static/ajax.js'></script>

This is an empty file, and it's not required for AJAX pagination.

Option 6. Remove the resource minifier scripts "sidjs-0.1.js" and "lazy_resources.js"?

Removes the following scripts:

<script type='text/javascript' src='http://www.yoursite.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/resource_minifier/static/sidjs-0.1.js'></script>

<script type='text/javascript' src='http://www.yoursite.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/resource_minifier/static/lazy_resources.js'></script>

These are present in early versions of NextGEN 2.0.

Option 7. Remove "frame_event_publisher.js"?

Removes the following script:

<script type='text/javascript' src='http://www.yoursite.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/frame_communication/static/frame_event_publisher.js'></script>

This is present in early versions of NextGEN 2.0.

Option 8. Remove persistent storage scripts "persist.js", "store.js", and "ngg_store.js"?

Removes the following scripts:

<script type='text/javascript' src='http://www.yoursite.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ajax/static/persist.js'></script>

<script type='text/javascript' src='http://www.yoursite.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ajax/static/store.js'></script>

<script type='text/javascript' src='http://www.yoursite.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ajax/static/ngg_store.js'></script>

Helpful for subsequent views, but detrimental to the initial load.

Option 9. Remove "nextgen_basic_thumbnails.js"?

Removes the following script:

<script type='text/javascript' src='http://www.yoursite.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/static/thumbnails/nextgen_basic_thumbnails.js'></script>

This is an empty file.

Option 10. Remove "font-awesome.css"?

Removes the following stylesheet:

<link rel='stylesheet' id='fontawesome-css' href='http://www.yoursite.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/static/fontawesome/font-awesome.css' type='text/css' media='all' />

A seemingly unused 18KB file for scalable vector icons. Appears to be for NextGEN Pro.

Option 11. Remove "trigger_buttons.css"?

Removes the following stylesheet:

<link rel='stylesheet' id='ngg_trigger_buttons-css' href='http://www.yoursite.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/static/trigger_buttons.css' type='text/css' media='all' />

A seemingly unused 1KB file to style trigger buttons. Again, appears to be for NextGEN Pro.

Option 12. Remove "nextgen_gallery_related_images.css"?

Removes the following stylesheet:

<link rel='stylesheet' id='ngg_trigger_buttons-css' href='http://www.yoursite.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/static/nextgen_gallery_related_images.css' type='text/css' media='all' />

Deregisters this stylesheet from the head on front-end, gallery pages, but only when the “Show Related Images on Posts?” option at Gallery -> Other Options -> Image Options is disabled, or when it’s enabled and we're not on a post page.

Option 13. Remove "nextgen_pagination/static/style.css"?

Removes the following stylesheet:

<link rel='stylesheet' id='ngg_trigger_buttons-css' href='http://www.yoursite.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_pagination/static/style.css' type='text/css' media='all' />

Deregisters this stylesheet from the head on front-end, gallery pages.

Option 14. Remove the custom stylesheet?

Removes the following stylesheet:

<link rel='stylesheet' id='ngg_trigger_buttons-css' href='http://www.yoursite.com/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_pagination/static/style.css' type='text/css' media='all' />

Deactivates the custom stylesheet at "Gallery --> Other Options --> Styles". It’s empty unless customized, and active by default.

Option 15. Use Optimizer's Enhanced Fancybox lightbox?

Optimizer includes and automatically integrates a unique Enhanced version of the attractive Fancybox lightbox with NextGEN Gallery. This checkbox option toggles the lightbox on or off, and is synced with NextGEN's lightbox options at Gallery -> Other Options -> Lightbox Effects.

Offering 1-click integration with NextGEN Gallery, Optimizer's Enhanced Fancybox lightbox is installed and selected by default upon plugin activation. Additionally, Optimizer will intelligently restore your previous lightbox settings when this checkbox is unchecked, and upon Optimizer's deactivation.

To activate Optimizer's Enhanced Fancybox lightbox (not required on initial install).

1. Navigate to Settings -> NextGEN Gallery Optimizer Basic/Pro
2. Switch on the Fancybox checkbox.
3. Click Save Options.

Alternatively, Optimizer's Enhanced Fancybox lightbox can also be activated by selecting it in NextGEN's lightbox effects menu at Gallery -> Options -> Effects (NextGEN Legacy/NextCellent Gallery) or Gallery -> Other Options -> Lightbox Effects (NextGEN 2.0)

Why use Optimizer's Enhanced Fancybox lightbox?

Optimizer's Enhanced Fancybox lightbox is based on the original GPL Fancybox script v1.3.4, and features a number of enhancements including responsive resizing (resizes automatically when the browser window is resized). Additionally, its required scripts and styles are only loaded as needed, helping to speed up your site.

The lightbox is also jQuery 1.9/1.10 ready and fully namespaced (to avoid common compatibility issues that affect other lightbox plugins), and thanks to its tight integration with NextGEN Gallery, can now be used with the gallery's AJAX pagination feature (you no longer need to use the Shutter effect).

For other included Fancybox enhancements, please see the main features page.

Option 16. Dynamic Fancybox Settings Interface button

Exclusive to Optimizer Pro, the Dynamic Fancybox Settings Interface provides several popular Fancybox customizations in one dynamic, what-you-see-is-what-you-get interface.

When clicked, the settings interface button launches the dynamic lightbox, and lets you configure the lightbox title style, background opacity and background color - without any coding or manual front-end refreshes required to see your changes.

It's the fastest and easiest way to customize Fancybox, and it's just a click away on Optimizer's settings page at Settings -> NextGEN Gallery Optimizer Pro.

To get started with the Dynamic Fancybox Settings Interface:

1. Navigate to Settings -> NextGEN Gallery Optimizer Pro.
2. Ensure the Fancybox checkbox is enabled. Select and save if not.
3. Click the Dynamic Fancybox Settings Interface button.
4. Experiment with the different settings combinations.
5. Click Save Options inside the interface.

All the custom code is written to the appropriate files automatically on save, and your customizations will be instantly live on the front-end of your site.

Settings overview:

The following Fancybox settings are available for customization in the interface...

Title position

With the title position select menu, there are five options you can choose from. None, Float, Over, Inside and Outside. The default is Float. Select each option individually to see which style you prefer.

Background color

With the background color color-picker, you can experiment with the full color palette for Fancybox's background overlay that masks the page. Alternatively, if you have an exact color in mind, simply enter its CSS color HEX value. The default is #666.

Background opacity

With the background opacity select menu, you have access to the full range of opacity levels for Fancybox's background overlay that masks the page. It has 11 stops ranging from 0 (invisible) to 1 (solid color) The default is 0.3.

Responsive resize

This option lets you activate the responsive resize feature in Optimizer Pro's Enhanced Fancybox Lightbox. This feature automatically resizes Fancybox when the browser window is resized, or when the orientation is changed on mobile devices.

Image counter

If you have large galleries, you may like to add an image counter to improve user experience. This option will prepend a counter (Eg. Image 1 of 30) to each of your image titles to enhance navigation.

Title from Alt

By default, Fancybox uses NextGEN's description fields at Gallery » Manage Gallery for titles. This option lets you fall back on the Alt text (Eg. "brooklyn-bridge.jpg") for images that don't have manually entered descriptions.

Option 17. NextGEN Gallery Deactivator

Exclusive to Optimizer Pro, the NextGEN Gallery Deactivator feature takes optimization a leap further, substantially improving your site's page load speed on non-gallery pages by excluding all NextGEN code from being processed on the front-end of your site (except on pages you specify).

To get started with Deactivator:

1. Navigate to Settings -> NextGEN Gallery Optimizer Pro
2. Switch on Deactivator's checkbox.
3. Enter the slug of an Allowed Page.
4. Click Save Options.

Further details:

Once you click Deactivator's on/off checkbox on Optimizer's settings page, a form field will slide down for you to enter an Allowed Page, which is essentially a front-end page you require gallery functionality on.

As an example, if you have a Gallery page at http://www.yoursite.com/gallery, you would enter the page slug of gallery.

If you have another page you want NextGEN to load on, simply click the Add another Allowed Page button, and an extra form field will slide down for you to fill in.

When you're finished adding Allowed Pages, simply click Save Options and you're all set. The pages you've entered will be the only places NextGEN will ever load outside the admin.

Like all other features in Optimizer, Deactivator works with NextGEN v2 (v2.0.0 to v2.1.60), NextGEN Legacy (v1.6.2 to v1.9.13), the NextCellent Gallery fork (v1.9.14 to v1.9.31) and will even deactivate the NextGEN Gallery Pro or Plus add-ons simultaneously (if installed alongside NextGEN v2).

Technical Note:

Optimizer's settings page fully validates the "Allowed Pages" input fields on save, and requires that at least one page is added (which will typically be your "Gallery" page).