go-thumbnail
The freedesktop.org Thumbnail Managing Standard, in pure Go. No cgo, no external tools.
go-thumbnail is a pure-Go (CGO_ENABLED=0) implementation of the freedesktop.org Thumbnail Managing Standard. It generates and caches file thumbnails exactly where and how the standard prescribes, so the thumbnails it writes are visible to other compliant tools — file managers, image viewers — and vice-versa.
Canonical cache under $XDG_CACHE_HOME/thumbnails in the standard size buckets, the required PNG metadata, fail markers, and shared-repository handling — a single portable module that cross-compiles to a static binary.
Why go-thumbnail
A thumbnail is only useful if the rest of the desktop can see it. go-thumbnail writes
thumbnails to the exact canonical location, in the exact PNG format with the exact
metadata, that the freedesktop.org
Thumbnail Managing Standard
prescribes — so a thumbnail generated here is picked up by file managers and image
viewers, and thumbnails they generate are picked up here. All in pure Go with cgo
disabled: a single portable module that cross-compiles to a static binary, no
gdk-pixbuf, no external thumbnailer processes.
Module
thumbnail
The library. Canonical cache under $XDG_CACHE_HOME/thumbnails/{normal,large,x-large,xx-large} (128 / 256 / 512 / 1024 px), the required PNG tEXt metadata (Thumb::URI, Thumb::MTime, …), fail markers, and shared-repository handling.
docs
Versioned documentation site (MkDocs Material + mike): the API surface, the cache layout, and metadata rules. Source →
brand
Logos and icons for the organization, in SVG / PNG / JPG / ICO / ICNS across colour, white and black variants.
Quality bar
- Pure Go.
CGO_ENABLED=0— no gdk-pixbuf, no external thumbnailer processes. - Spec-faithful cache. Canonical directory layout, PNG
tEXtmetadata and fail-marker semantics, so the cache interoperates with existing desktop tools. - 100% test coverage is the bar, error branches included.
- Portable. A single module that cross-compiles to a static binary on every 64-bit target.
- BSD-3-Clause on every source file.