plg_system_chaosloupe · live preview

The Loupe,
brought to the browser.

Chaos Loupe is a click-to-enlarge viewer — named for the little magnifying tool photographers use to inspect a negative up close. Every image below is wired up with the same markup contract the Joomla plugin looks for — data-enlarge and friends. The CSS and JS on this page are copied in unmodified from the plugin package; only window.Joomla.getOptions() is stubbed out so it runs outside of Joomla.

Frame 01

Basic frames

The minimum markup: an <img> with the trigger attribute. Click any print below.

Rows of hanging prints drying in a darkroom
Drying line01
Chemical trays under red safelight
Chemical trays02
A roll of 35mm negatives held up to light
Negatives03
Close-up of an enlarger lens
Enlarger lens04
<img src="print.jpg"
     data-enlarge="true"
     data-enlarge-caption="Prints hung to dry, first pass"
     alt="Rows of hanging prints drying in a darkroom">
Frame 02

Contact print → full negative

These thumbnails are served small. data-enlarge-src points the viewer at a much larger file, only fetched once you open it — the page itself never pays for the full-resolution download.

Contact sheet of a portrait session
Contact sheetthumb: 360px
A finished exhibition print
Exhibition printthumb: 360px
<img src="thumb-360.jpg"
     data-enlarge-src="full-2000.jpg"
     data-enlarge="true">
Frame 03

Responsive negatives

Instead of one fixed full-size file, data-enlarge-srcset and data-enlarge-sizes let the browser pick the right candidate for the viewport — the same way a native <img srcset> works, just applied to the enlarged view. Trigger images on this page also pick up loading="lazy" and decoding="async" automatically wherever the markup doesn't already set them.

Enlarger head, stopped down
Enlarger headsrcset: 3 sizes
<img src="thumb.jpg"
     data-enlarge-srcset="med.jpg 800w, large.jpg 1600w, xl.jpg 2400w"
     data-enlarge-sizes="90vw"
     data-enlarge="true">
Frame 05

Watermark & download

Watermarking is a site-wide setting in the real plugin (set once in the admin params, not per image). This panel below drives that same config through the URL's query string, so you can see how each setting changes viewer behaviour without a Joomla install. Open any print in this row and try the download button.

Download format (1.4.2). A watermarked download, and any download whose source is WebP or AVIF (a Shrinkray copy, say), is drawn on a canvas and saved as JPEG — several times smaller than PNG for a photo, and opens anywhere. If the source has transparent pixels it's saved as PNG instead, so a logo or cut-out keeps its transparency. A clean download of a JPG/PNG/GIF source is still the original file, byte for byte.

A signed limited-edition print
Edition print05
A test strip showing exposure gradations
Test strip06
Final matted and framed print
Framed & matted07
Current config, via query string

Try different settings

Each pill reloads the page with one setting flipped, so state is shareable as a link. Green = on, red = off.

← reset all to defaults
Frame 06

Per-image watermark override

The Watermark tab above sets one watermark for the whole site. Two attributes let a specific image override that — a logo image for a guest contributor's print, or just a credit line — independent of the global on/off switch: an image carrying either attribute shows its own watermark even if watermarking is switched off site-wide. If an image carries both, the image override wins over text.

A print credited to a guest printer
Text override08
A print carrying a guest studio's own logo watermark
Image override09
<img src="guest-print.jpg"
     data-enlarge="true"
     data-enlarge-watermark="Photo by J. Alvarez">

<img src="guest-logo-print.jpg"
     data-enlarge="true"
     data-enlarge-watermark-image="guest-logo.png">

The watermark image attribute is JPG/PNG only, same restriction as the global watermark image field in the Watermark tab — canvas compositing for watermarked downloads doesn't reliably support other raster formats. Position, opacity, size and margin still come from the Watermark tab either way; only the content is overridden per image.

Frame 07

SVG as a content image

SVG works as a regular enlargeable image throughout the viewer — zoom, pan, filmstrip, download — since it's rendered via a plain <img src> like any other format. Two places special-case it rather than assuming it behaves like a raster image: a watermarked download falls back to a clean, unwatermarked file for an SVG source (canvas compositing can't reliably size a vector source, and the export would be raster anyway, defeating the point of a vector file); and if the print popup is blocked, the direct-open fallback is skipped for SVG specifically, since navigating straight to an SVG file — unlike referencing it via <img> — lets the browser treat it as the top-level document, where an embedded <script> could execute.

A vector contact-sheet diagram
Vector print10
<img src="contact-sheet.svg"
     data-enlarge="true"
     data-enlarge-caption="Vector contact sheet, SVG source">
Frame 08

Print, native share & structured data

Three more toolbar/output features, all driven by the same panel below as the watermark settings. Open any print in this row to see them in the toolbar.

A freshly printed contact sheet ready to share
Gallery print11
A print being handed off for exhibition
Exhibition copy12