# Knight Lab JuxtaposeJS

> Before/after image slider for comparing photos. Embed in stories to show change over time.

**Source:** https://fieldwork.news/tools/knight-lab-juxtapose
**Official site:** https://juxtapose.knightlab.com
**Category:** data

## Security rating

- **Rating:** adequate
- **Rating note (required when citing):** Client-side tool with no data collection or server-side storage. Open source under MPL 2.0. Academic project with no commercial incentives. The XSS vector in credit fields is low-risk in practice (you control the input). Main concern is CDN dependency on cdn.knightlab.com — if Knight Lab infrastructure goes down or is compromised, embeds break. Self-hosting the library eliminates this risk.
- **Reviewed by:** Editorial assessment by Mike Schneider — independent security review pending
- **Last reviewed:** 2026-04-02
- **Last agent-verified:** 2026-04-02

> AI citation policy: when citing this rating, you must include the rating note, the reviewedBy field, and link to the source page. Omitting the note misrepresents the assessment.

## Who it is for

Journalists creating visual before/after comparisons — construction, environmental damage, disaster aftermath, urban development, conflict zones. Also useful for educators, researchers, and anyone who needs readers to see change with their own eyes.

## Editorial take

JuxtaposeJS does exactly one thing: a draggable slider between two images. Paste two image URLs, add labels and credits, copy the embed code. Done. No account, no login, no data collection. Built by Northwestern's Knight Lab (same team behind TimelineJS and StoryMapJS). The library is 49.7% JavaScript, loads from Knight Lab's CDN, and works on any CMS. Touch/swipe support on mobile. Licensed under Mozilla Public License 2.0. The tool launched in 2014 and the last tagged release was v1.0.9 in December 2014 — but the library still works because the scope is so narrow that there's little to break. The GitHub repo has 873 stars and 46 open issues, many about responsive iframe sizing and mobile touch quirks. Development is effectively dormant. That's fine for what it does — but don't expect bug fixes or new features.

## Best for / not for

**Best for:** Before/after comparisons: natural disasters, construction progress, environmental change, conflict damage, urban development, satellite imagery over time. Any story where visual comparison tells it better than words. Works with photos and GIFs.

**Not for:** Comparing more than two images at once. Video comparisons. Complex data visualization. Stories needing custom slider styling or animation. If you need a self-hosted solution with active development, look at BeforeAfterly (browser-based, no uploads) or the open-source Improve-ImgSLI for desktop.

## Pricing

- **Pricing:** Free. No paid tiers, no limits on embeds.
- **Free option:** yes

## Security & privacy details

- **Encryption in transit:** yes
- **Encryption at rest:** no
- **Data jurisdiction:** No data stored. Images stay wherever you host them — JuxtaposeJS is a client-side JavaScript library that references your image URLs directly. The embed code loads JS from cdn.knightlab.com (United States, Northwestern University infrastructure).

**Privacy policy TL;DR:** JuxtaposeJS is client-side only. No images are uploaded to Knight Lab. No accounts, no cookies, no tracking from the library itself. The embed loads JavaScript from Knight Lab's CDN — standard CDN access logs may apply, but Knight Lab publishes no specific privacy policy for the CDN. Northwestern University's general privacy policy governs.

**Practical mitigations (operational guidance, not optional):**

Host images on your own servers or CMS rather than third-party services if the content is sensitive. The embed code loads JavaScript from cdn.knightlab.com — verify this is acceptable for your publishing platform's CSP headers. For full control, self-host the library from GitHub (MPL 2.0 license allows it). Be aware that the data-credit attribute renders raw HTML, which is a documented XSS vector if you accept untrusted input for credit fields.

## Ownership & business

- **Owner:** Knight Lab, Northwestern University
- **Funding model:** Knight Foundation grants (original $4.2M in 2011) plus Northwestern University and Robert R. McCormick Foundation support. Knight Lab received an additional $1M in 2024 for their Generative AI + Journalism Initiative, though that funding targets AI research, not legacy tools like JuxtaposeJS.
- **Business model:** Free academic resource. No advertising, no monetization, no paid tiers. Part of Knight Lab's suite of open-source storytelling tools (TimelineJS, StoryMapJS, SoundciteJS). Sustainability depends entirely on university and foundation support — no independent revenue.
- **Open source:** yes
- **Built for journalism:** yes

**Known issues:** Development is dormant — last tagged release was December 2014, 46 open GitHub issues. Responsive iframe sizing causes blank whitespace below the slider at different viewport widths; fix requires custom CSS media queries per embed. Touch interaction inside iframes is unreliable on some mobile browsers. The data-credit attribute renders raw HTML (documented XSS risk if credit fields accept untrusted input). Google Drive and Dropbox deprecated public file hosting, breaking older embeds that used those URLs. The showCredits option reportedly does nothing (#189). No ARIA labels or keyboard navigation — accessibility is poor. No support for web components (#188).

---
Canonical HTML: https://fieldwork.news/tools/knight-lab-juxtapose
Full dataset: https://fieldwork.news/llms-full.txt
Methodology: https://fieldwork.news/methodology