Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/sanskarsharma/thumbgen/llms.txt

Use this file to discover all available pages before exploring further.

Thumbgen is a Go web service that generates 200×200 PNG thumbnails from images and videos and uploads them via HTTP PUT. Running it locally is the fastest way to get started — you only need the Go toolchain and, optionally, ffmpeg if you want video thumbnail support.

Prerequisites

  • Go 1.14 or laterhttps://go.dev/dl/
  • ffmpeg — required for generating thumbnails from video files. Install via your system package manager (e.g. brew install ffmpeg, apt install ffmpeg, choco install ffmpeg).
  • git — to clone the repository.

Clone and Run

git clone https://github.com/sanskarsharma/thumbgen.git
cd thumbgen
go run main.go
The service starts and listens on port 4499. You will see the following output in your terminal:
Listening on :4499...
Frontend available at: http://localhost:4499
API endpoint: http://localhost:4499/thumbify

Shell Environment

Thumbgen uses ash (the Alpine Linux shell) by default — this is the correct setting when running inside the Docker container. When running locally on macOS or Linux, your system uses bash, so you must set the ENV=LOCAL environment variable to tell Thumbgen to invoke bash instead of ash for video processing:
ENV=LOCAL go run main.go
Without ENV=LOCAL, video thumbnail generation will fail on local machines because Thumbgen will attempt to call ash, which is typically not available outside an Alpine environment. Image thumbnail generation is not affected and works without this variable.

Accessing the Service

ResourceURL
Web frontendhttp://localhost:4499
API endpointhttp://localhost:4499/thumbify
Thumbgen ships with a built-in web frontend served at http://localhost:4499. Open it in your browser to generate thumbnails interactively — no API client required.

Build docs developers (and LLMs) love