4QueriesFree audit
JavaScript libraryFreeVersion 1.0.1 · MIT · 2.3 KB gzipped · no dependencies

figlight: a lightbox that keeps your captions

Click a photo and it opens full screen with the caption your page already wrote, credits and licence links included. Arrow keys and swipe move between images, Escape closes. One file, no dependencies, nothing to configure.

The licence

Free on a commercial site

Fancybox is excellent, but every live site needs a paid licence, from €29. figlight is MIT: use it anywhere, nothing to buy, no banner to display.

The caption

Credits stay clickable

The figcaption is carried into the full-screen view as HTML. When you publish Wikimedia Commons or Unsplash photos, the author name and licence link are a requirement, not decoration.

The weight

2.3 KB, one request

Against 43 KB of JS and CSS for Fancybox. No stylesheet to load, no font, no network call of its own. It injects its own styles and gets out of the way.

Install, one line

Put it at the end of the page. Every figure with an image becomes clickable.

<script src="https://cdn.jsdelivr.net/gh/trendbender/[email protected]/dist/figlight.min.js"></script>

Need a different selector, your own caption source or translated button labels? Switch the automatic start off and call it yourself:

<script src="figlight.js" data-figlight="manual"></script>
<script>
  figlight.create({
    selector: 'article img, .cards img',
    caption: (img) => img.dataset.credit || img.alt,
    labels: { close: 'Schließen', prev: 'Zurück', next: 'Weiter' }
  });
</script>

What it handles for you

It was written for our own publishing engine, where every article carries maps and credited photos, and the credit under the photo has to survive into the enlarged view.

What it does not do

figlight is not a full Fancybox replacement. It has no zoom or pinch, no thumbnails, no video, iframes or PDF, and no themes. If you need those on a commercial site without a licence fee, GLightbox and PhotoSwipe are good choices. Pick figlight when the page already has captions and you want one line and nothing else.

figlight 1.0.1Fancybox 6.1.15PhotoSwipe 5.4.4GLightbox 3.3.1baguetteBox 1.13.0
LicenceMITPaid for every live siteMITMITMIT
Size2.3 KB43.2 KB23.5 KB17.9 KB4.6 KB
CaptionsReads figcaption, keeps HTMLYesCustom code or plugintitle and description, HTML allowedtitle or data-caption
ZoomNoYesYesYesNot in its docs
VideoNoYesNot in its docsYesNot in its docs

Checked on 6 November 2026 against the Fancybox licence and prices and each project's documentation. Size is the published JS plus CSS from npm, compressed with gzip -9. The old Fancybox 3.5.7 package is GPLv3 and needs jQuery. More detail: Fancybox licence and free alternatives.

Want the whole content engine, not just the viewer?

We build article pipelines that research, write, fact-check and illustrate pages at scale, with maps, credited photos and honest sources. Tell us what you publish.

Get a free 4Queries audit