Fast thumbnails for
online media.
-
wavy-wall.svg
-
space-colony.jpg
-
miss-library.avif
-
math-codes.jpg
-
grass-texture.dds
-
stanford-bunny.stl
-
base-glove.usdz
-
math-guide.odt
-
harbor-trucks.mp4
-
kids-theater.heic
-
stream-barn.mkv
-
packing-boxes.avi
-
blue-scooter.fbx
-
apollo-exterior.glb
-
raw-pentax.pef
-
pocket-game.webp
-
dudu-intro.mp3
-
pixel-forest.gif
-
neon-block.png
-
padres-stereo.exr
-
raw-canon.cr2
-
kapaa-mips.exr
-
boone-train.jp2
-
game-level.png
-
corrupt.jpg
-
missing-file
-
golden-gate.exr
-
wavy-wall.svg
-
space-colony.jpg
-
miss-library.avif
-
math-codes.jpg
-
grass-texture.dds
-
stanford-bunny.stl
-
base-glove.usdz
-
math-guide.odt
-
harbor-trucks.mp4
-
kids-theater.heic
-
stream-barn.mkv
-
packing-boxes.avi
-
blue-scooter.fbx
-
apollo-exterior.glb
-
raw-pentax.pef
-
pocket-game.webp
-
dudu-intro.mp3
-
pixel-forest.gif
-
neon-block.png
-
padres-stereo.exr
-
raw-canon.cr2
-
kapaa-mips.exr
-
boone-train.jp2
-
game-level.png
-
corrupt.jpg
-
missing-file
-
golden-gate.exr
-
wavy-wall.svg
-
space-colony.jpg
-
miss-library.avif
-
math-codes.jpg
-
grass-texture.dds
-
stanford-bunny.stl
-
base-glove.usdz
-
math-guide.odt
-
harbor-trucks.mp4
-
kids-theater.heic
-
stream-barn.mkv
-
packing-boxes.avi
-
blue-scooter.fbx
-
apollo-exterior.glb
-
raw-pentax.pef
-
pocket-game.webp
-
dudu-intro.mp3
-
pixel-forest.gif
-
neon-block.png
-
padres-stereo.exr
-
raw-canon.cr2
-
kapaa-mips.exr
-
boone-train.jp2
-
game-level.png
-
corrupt.jpg
-
missing-file
-
golden-gate.exr
About
Thumbrella is the
open source
Apache 2 license for the server and all client libraries.
One of the simplest licenses to integrate into most projects.
server for online thumbnails.
Serve
fast, cached
Server written in Rust and deployed to the edge in over 300 regions.
Full integration with http caching headers and range requests
for excellent performance.
thumbnails from over
100 formats
Handles megapixel imagery with complicated pixel formats and codecs.
Efficiently work through massive video files.
Render quality images from vector artwork, 3d models, and documents.
Quickly extract embedded thumbnails and cover art from other formats.
:
photographs, videos, documents, even 3D models.
One command
Run from most operating systems, `npx @thumbrella/server serve`
and be running in seconds.
Or work with Docker with `docker run -it -p 3114:3114 thumbrella/server`.
runs it locally or in Docker. Our
Thumbrella Cloud
Register with an existing developer account in two clicks, no payment info.
Set your token and get full access to all features.
is efficient enough to offer a genuinely useful free tier.
Start with
client libraries
packages already available for Typescript, Python, and Rust.
High level web components for Astro and React.
Set a connection string, `Client().batch(urls)`, and done.
Docs →
for languages you already use. Docs and examples get you
streaming thumbnails
Stream individual thumbnails or batch-process entire directories.
Resilient clients provide placeholders even when the server is unreachable.
immediately.
MP4, MOV, MKV, AVI, FLV, TS, M4V, 3GP, OGV, WMV, MPEG... Images×19 Common image formats designed to be lightweight for a variety of digital uses. From tiny pixel art to panoramic megapixels.
JPEG, PNG, WEBP, AVIF, GIF, TIFF, BMP, HEIC, JP2, JXL, ICO, PSD, PPM, TGA... Photographs×27 Camera and film formats are often heavy and high definition frame captures, multichannel imagery that requires color processing.
RAW, DNG, EXR, HDR, CR2, NEF, ARW, ORF, RW2, PEF, SRW, RAF, 3FR, MEF... 3D geometry×26 Three dimensional models and scenes that can contain triangles, shaders, and textures.
OBJ, GLTF, GLB, STL, FBX, USDZ, IGES, DAE, PLY, 3DS, VRML... Documents×6 Documents are usually multi-page collections of styled text and media.
DOCX, PPTX, ODT, XLSX, ODS, ODP, PDF (soon). And more×10 Vector graphics are rendered in high quality. Even audio formats commonly provide cover art to view. And more on the way.
SVG, MP3, FLAC, OGG, M4A, AAC...
# 1. Spin up a Docker server (or choose the cross platform binaries)
docker run --name tbr --publish 3114:3114 --rm thumbrella/server:latest
# 2. From another terminal, use a client library
export TBR_CONNECT=http://localhost:3114
uvx thumbrella-client basic https://demo.thumbrella.dev/media/math-guide.odt
# 3. Or use CLI commands to generate a thumbnail from any URL or path
npx @thumbrella/server thumb https://demo.thumbrella.dev/media/harbor-trucks.mp4 out.jpg News
Grab a Client
The Javascript client is a great starting point for both node and browser environments.
- Zero runtime dependencies, only needs
fetch - Stream async results as the server renders thumbnail batches
- Caching takes full advantage of HTTP cache headers
- Binary thumbnails load easily into
sharp, dom nodes, and other image libraries - Always provides placeholder, even when disconnected or misconfigured
- Typed results with media classification and metadata
- Bundled CLI for thumbnailing local files
- Thumbrella server supports hundreds of formats
// Install with, `npm install @thumbrella/client` //
import { Client } from "@thumbrella/client";
// Connect and generate a single thumbnailconst tbr = await new Client();const result = await tbr.thumb("https://demo.thumbrella.dev/media/pocket-game.webp");console.log(result.status, result.media!.thumbnail.length, "bytes");
// Stream results as they completefor await (const r of tbr.stream([ "https://demo.thumbrella.dev/media/padres-stereo.exr", "https://demo.thumbrella.dev/media/golden-gate.exr",])) { console.log(r.url, r.status);}The source comes with several starting point examples. See the client documentation for more details and examples.
- examples/basic.js Download a thumbnail from a single url.
- examples/stream.ts Stream multiple thumbnails as they render.
There are separate packages with high level web components for React, Astro, and others.
The Python client uses requests for blocking and optionally aiohttp for
async streaming results.
- Client defaults to synchronous requests with requests
- Async support via
thumbrella-client[async]using aiohttp - Caching takes full advantage of HTTP cache headers
- Binary thumbnails load easily into
PIL,Qt, `Pygame, and other image libraries - Always provides placeholder, even when disconnected or misconfigured
- Typed results with media classification and metadata
- Thumbrella server supports hundreds of formats
## Install with, `uv add thumbrella-client` ##
import thumbrella
# Connect to server and generate a thumbnail.tbr = thumbrella.Client()result = tbr.thumb("https://demo.thumbrella.dev/media/blue-scooter.fbx")print(result.status, len(result.media.thumbnail), "bytes")
# Pillow can decode from a zero-copy buffer.from PIL import Imageimg = Image.open(result.media.thumbnail.io)The source comes with several starting point examples. See the client documentation for more details and examples.
- examples/basic.py Download a thumbnail from a single url.
- examples/stream.py Stream multiple thumbnails as they render.
- examples/collage.py Assemble thumbnails from multiple sources into a single grid image.
The Rust client provides easy, high level functionality for caching, error
control, and other conveniences. By default it provides async calls using
reqwests and tokio. Using the blocking feature provides a blocking
interface for simpler environments.
- Async-first with reqwest (rustls TLS)
- Minimal dependencies,
reqwest,serde,base64,thiserror - Stream results as the server renders thumbnails (coming soon)
- In-memory LRU cache takes full advantage of HTTP cache headers
- The client and server always provide placeholder images, even when disconnected
- Typed results with media classification and metadata
- Thumbrella server supports hundreds of formats
// Install with, `cargo add thumbrella-client` //
use thumbrella_client as thumbrella;
#[tokio::main]async fn main() -> Result<(), thumbrella::Error> { let tbr = thumbrella::Client::new(None); tbr.verify().await?;
// Get result and write thumbnail to jpeg file let result = tbr.thumb("https://demo.thumbrella.dev/media/game-level.png").await?; if let Some(media) = &result.media { println!("{} bytes {}", media.thumbnail.len(), media.kind); std::fs::write("thumb.jpg", media.thumbnail.bytes())?; }
Ok(())}The source comes with several starting point examples. See the client documentation for more details and examples.
- examples/basic.rs Download a thumbnail from a single url.
- examples/stream.rs Stream multiple thumbnails as they render.
The direct HTTP requests are designed to be usable without rich clients. This
can work from any language with any HTTP library. Also from command line tools
like curl or wget.
- Batch requests process in parallel
- Streamable batch results with
ndjsonorsse - Every request results in a valid image or placeholder
- Server provides advanced http caching support
- Thumbrella server supports hundreds of formats
curl -G "http://localhost:3114/thumb" \ --data-urlencode "url=https://demo.thumbrella.dev/media/harbor-trucks.mp4" \ --output thumb.jpegTo interact with Thumbrella Cloud, register online for a quick and free account. Then add the token into the Authoriation header.
curl -G "https://cloud.thumbrella.dev/thumb" \ --data-urlencode "url=https://demo.thumbrella.dev/media/golden-gate.exr" \ --header "Authorization: Bearer tbr_e_HVZgIwSOUwhJZscXQ2sN7eO" \ --output thumb.jpegSee the client api documentation for more details on the calls available.
The Astro components provide a higher level component for thumbnails. These components are still a work in progress and not ready yet for immediate use.
Get started with npm install @thumbrella/astro.
The thumbnail components work together to handle streaming, batching, and caching automatically.
---import { Client, Thumbnail } from '@thumbrella/client';
const tbr = new Client(import.meta.env.THUMBRELLA_KEY);---<Thumbnail src="https://demo.thumbrella.dev/media/harbor-trucks.mp4" />Each page is expected to have a global <Thumbrella> component to define
the server and configuration details. The page then uses multiple
<Thumbnail> components.
The thumbnails are intended to be handled by browsers as the page is viewed. They are not downloaded and applied to the site as static content.
Grab a Server
Self hosting your own Thumbrella server is designed to be straightforward and simple. Find the prepackaged option that best fits your environment.
# Run through packaged npm servers (uvx package also available)npx @thumbrella/server serve
# Docker containerdocker run --name tbr --publish 3114:3114 --rm thumbrella/server
# Download binaries for your platform (statically linked, no difficulties)wget http://github.com/thumbrella-dev/thumbrella/releases/latest/thumbrella-win64.exethumbrella-win64 serveBy default the server will listen on port 3114. This can be override by
setting $TBR_PORT to a different value. There are several other
settings also managed by environment variables. These can be validated
by running thumbrella check for a simple report and diagnostics.
See the Server Documentation for more commands and configurations. Including how different media formats are handled. This also has instructions on optionally compiling Thumbrella for yourself.
Thumbrella provides a set of online servers that are ready to work. These provide several immediate benefits.
- All media formats and features supported
- Caching CDN to over 300 regions
- Usable free tier for all users
Sign up with your existing Github or Google account with two clicks. No payment info or additional data required.
Once registered you will receive an authentication token. Set your
$TBR_CONNECT environment variable to this token and use any of the
available client libraries.
The Thumbrella Demo gallery also hosts a Thumbrella server that can be used immediately with no account. The only restriction is that this only provides thumbnails for media in in the demo gallery.
set TBR_CONNECT=https://demo.thumbrella.dev
This makes it one of the easiest ways to test client tools and environments. It requires no server, and no Thumbrella cloud account.
The demo site provides an index.json
that describes the catalog of media.
curl https://demo.thumbrella.dev/thumb.jpeg?url=https://demo.thumbrella.dev/media/wavy-wall.svg \ --output vector.jpegRun Thumbrella as a serverless model on Replicate. No installation. The platform bills per render, there is no additional Thumbrella cost.
This is not yet enabled. Wait for Thumbrella’s general release to access this service.
npm install replicateimport Replicate from 'replicate';const replicate = new Replicate();
const output = await replicate.run( "thumbrella/thumb", { input: { url: "https://example.com/video.mp4" } });// output base64 image dataYou can greatly reduce the efficiency of using Replicate by attaching your Thumbnail Cloud token to each request. This allows Replicate to use Thumberlla Cloud’s distributed caching. Use with your free account to cache thousands of thumbnail results.
Sponsors
Great looking media projects have excellent thumbnails. Anyone can build incredible project using Thumbrella. The future of Thumbrella development and features will be driven by sponsors.
For teams and developers looking to get the most out of Thumbrella, a sponsorship goes a long way to securing the future of this project and service for all users.
See the sponsors page for more details.
thumbrella.dev