Type to search.

#946 by installs

FancyBox for WordPress

by colorlibpluginsVersion 3.4.2

Seamlessly integrates FancyBox lightbox into your WordPress blog: Upload, activate, and you're done. Additional configuration optional.

Active installs
30,000+
#946 of 1,000
Downloads, all time
2M
1,983,109
Downloads, 30 days
5.3K
1.4K in the last 7
Rating
4.6 / 5
92 reviews
Last updated
3 months ago
Aug 7, 2026
Version
3.4.2
62 releases

Upkeep and compatibility

Last updatedAugust 7, 2026Updated in the last 3 months
Tested up toWordPress 7.0.8Older than WordPress 7.1.4, the current release
Needs WordPress5.6 or newer
Needs PHP7.4 or newer
First publishedFebruary 6, 2009
Support, last two months0 of 1 threads resolved (0%)

Reviews

4.6 / 5 from 92 reviews

Reviews by star rating
5 stars76
4 stars6
3 stars2
2 stars1
1 star7

Downloads, last 30 days

Low 85 a dayHigh 556 a day

What the author says it does

FancyBox for WordPress turns the images you already have into a lightbox gallery. Activate it and every image that links to a full-size file opens in an overlay instead of loading a new page — in posts, pages, widgets and the block editor’s gallery blocks, with no shortcodes and nothing to add to your content.

If the defaults suit you, there is nothing to configure.

What you get out of the box

  • Click any linked image to open it in an overlay, with the rest of the page dimmed behind it
  • Arrow keys, on-screen arrows, swipe on touch devices, and Escape to close
  • Zoom, slideshow, thumbnail strip and full-screen controls in the toolbar
  • Captions taken from the image title, the block editor’s caption, or a data-caption attribute
  • Galleries grouped automatically — everything on the page, per post, or per gallery block
  • PDFs, videos and other pages open in the lightbox too

What you can change

Settings live under Settings → Fancybox for WP, split into Appearance, Animations, Behaviour, Galleries and Misc:

  • Overlay colour and opacity, padding, border, background colour
  • Caption position (inside the frame, over the image, or below it), size and colour
  • Opening and transition animations, and their speed
  • Close on overlay click, close on image click, zoom on click, mouse-wheel navigation, looping

The opening of the plugin's own description. The full text, installation notes and changelog are on its WordPress.org page.

Questions the author answers

How do I add a caption?

Three ways, and they stack:

  • Set the image’s Title in the media library or block settings — it appears under the image.
  • Add a caption in the block editor — it is picked up automatically.

• Add data-caption to the link for longer or formatted text:

Basic HTML such as <br>, <em> and <a> is allowed. Captions are sanitised before display, so scripts and event handlers are stripped.

How do I stop one image opening in the lightbox?

Add class="nolightbox" to the link. Links from Envira Gallery and NextGen Gallery are skipped automatically so the two lightboxes do not fight.

The lightbox looks wrong — the image is cut off, stretched, or barely visible

Almost always another plugin or theme loading its own copy of FancyBox. Two stylesheets defining the same class names will fight, because FancyBox’s CSS class names are shared.

To check, open your browser’s developer tools, look at the Network tab, and search for fancybox. If you see a .css file from anywhere other than /plugins/fancybox-for-wordpress/, that is the conflict.

Images loaded by infinite scroll or lazy loading do not open

Fixed in 3.4.1. Thumbnails added after the page has finished loading — infinite scroll, lazy loading, AJAX filters — are now detected and bound automatically. Update if you are on an older version.

Can I load the lightbox only on certain pages?

Yes, with a filter. Put this in your theme’s functions.php or a site-specific plugin:

add_filter( 'mfbfw_is_enabled', function ( $enabled ) { return is_page( array( 'portfolio', 'gallery' ) ); } );

Returning false means nothing loads at all — no CSS, no JavaScript. There are also built-in switches for mobile, WooCommerce shop pages and product pages under Behaviour.

PDFs open in the lightbox. How do I stop that?

Turn on Exclude PDF files under Behaviour and PDF links will open normally.

Note that iOS Safari cannot display a PDF inside an overlay at all. If your visitors are mostly on iPhones or iPads, excluding PDFs is the more reliable choice.

Latest changelog entry

3.4.2

Fixed: The lightbox could collapse to a thin sliver instead of showing the image, and videos played sound with no picture. The plugin’s stylesheet carried a height: auto !important rule that overrode the height FancyBox calculates for each slide. On its own it happened to work, but as soon as a second copy of FancyBox’s CSS was on the page – any theme or plugin bundling its own – the content box collapsed to nothing. The rule was added in 3.2.5 for a problem that no longer exists, and has been removed.

Screenshots

From WordPress.org.

Tagged

Plugins that share its tags

#328 by installs

Responsive Lightbox & Gallery

by dFactory

The most popular lightbox plugin and responsive gallery builder for WordPress.

Installs
100,000+
Rating
4.9 (2K)
Updated
11 days ago

#77 by installs

Autoptimize

by Optimizing Matters

Autoptimize speeds up your website by optimizing JS, CSS, images (incl. lazy-load), HTML and Google Fonts, asyncing JS, removing emoji cruft and more.

Installs
800,000+
Rating
4.7 (1.4K)
Updated
6 days ago

Add 50+ shortcodes with live preview for tabs, accordions, buttons, FAQs, sliders and boxes. Works in Block Editor and Classic Editor.

Installs
400,000+
Rating
4.9 (5.9K)
Updated
14 days ago

#167 by installs

WebP Express

by rosell.dk

Serve autogenerated WebP images instead of jpeg/png to browsers that supports WebP.

Installs
300,000+
Rating
4.4 (162)
Updated
13 days ago

#257 by installs

Firelight Lightbox

by Firelight

Formerly Easy Fancybox. The most popular WordPress lightbox plugin. Simple, fast, and responsive. Opens images, videos, PDFs, and custom popups.

Installs
200,000+
Rating
4.8 (361)
Updated
26 days ago

Where this page's numbers come from

Read from the WordPress.org plugin API on , when WordPress 7.1.4 was the current release. WordPress.org rounds active installs into buckets. These are the directory's figures, not my verdict, and I haven't tested this plugin.