
Self-hosted image backend handling uploads, validation, S3/filesystem storage, libvips-powered transformations, SigLIP2 content classification, path-based rules and variants, plus CDN-friendly redirect delivery.
The self-hosted image backend your application doesn't have to build.
Adding image uploads means more than putting files in a bucket. Your team needs validation, thumbnails, replacement behavior, metadata, cache rules, and deletion across storage and application records. Konifer provides those capabilities through one HTTP API so you can spend less time building and maintaining image infrastructure.
Use your storage and CDN, and choose image paths that fit your application. Address a profile picture by user, a gallery by product, or an individual image by ID. Group related images under shared paths to apply storage and processing policies and delete them together.
Deploy Konifer alongside PostgreSQL and S3-compatible storage or a persistent filesystem. Image processing and background variant generation run inside Konifer.
10-minute quickstart · Documentation · Deployment · Performance report
I've seen the same story on several teams: someone needs to store a product photo, then another feature needs thumbnails, then a third needs different upload limits. Before long, image handling is spread across S3 buckets, Lambdas, queues, and services. Replacing a photo, keeping its history, or deleting a user's images means coordinating those pieces again.
With Konifer, you configure those jobs in one service and keep the image handling code out of individual applications:
You can give avatars, marketplace listings, and tenant branding different storage and processing policies while running the same service.
Run the 1.0 release candidate with in-memory storage:
docker run --name konifer-quickstart \
--publish 8080:8080 \
--env IN_MEMORY=true \
ghcr.io/dmaiken/konifer:1.0.0-rc.1In-memory mode loses all uploaded images and metadata when the container stops.
Follow the 10-minute quickstart to upload, transform, and replace your first image.
You define the paths you use to store and retrieve images. Use a resource path such as
/assets/users/123/profile-picture to address a user's current picture. Construct its URL from the user ID without
storing a separate image reference:
POST /assets/users/123/profile-picture
GET /assets/users/123/profile-picture/-/content?width=256&format=webp
GET /assets/users/123/profile-picture/-/infoUse an image ID of your choosing when you want an independent image reference. Combine image IDs with resource paths to organize individual images within a user's collection:
POST /assets/{imageId}
GET /assets/{imageId}/-/content
POST /assets/users/123/images/{imageId}
GET /assets/users/123/images/{imageId}/-/contentEach upload gets a Konifer entryId within its chosen path. Use the path to fetch the current image or select an entry
to retrieve a specific version:
GET /assets/users/123/profile-picture/-/entry/0/contentShared parent paths give you a way to configure policies and manage related images. Apply upload limits to user
images, choose a bucket for profile pictures, or delete a user's images through one request. If user 123 closes their
account, delete the images below users/123 without assembling a list of individual image IDs:
POST /assets/users/123/profile-picture
POST /assets/users/123/images/{imageId}
DELETE /assets/users/123/-/recursiveSee the asset model for collections, upload history, and entry selection.
Define storage and processing rules in konifer.conf so callers can upload and fetch images without repeating the
policy for each image category. This example limits user images to 15 megapixels, stores profile pictures in a
dedicated bucket, and generates a WebP thumbnail after upload. Requests for transformed profile pictures must use the
named profile:
variant-profiles {
thumbnail {
width = 256
height = 256
fit = fill
rotate = auto
format = webp
}
}
paths {
"/users/**" {
limits {
max-pixels = 15MP
}
}
"/users/*/profile-picture" {
object-store {
bucket = profiles
}
transform {
eager-variants = [thumbnail]
on-demand-variant {
mode = profile_only
}
}
}
}Mount your configuration at /app/config/konifer.conf. With S3-compatible storage, create the profiles bucket before
using this example. See the deployment guide for the storage setup.
Fetch the thumbnail with:
GET /assets/users/123/profile-picture/-/content?profile=thumbnailProfile pictures inherit the pixel limit from /users/**. Add more specific rules for other image categories to
choose their buckets, accepted formats, variant generation, caching, and delivery behavior. The
path configuration docs cover matching and inheritance.
Konifer ships as a Docker image for Linux amd64 and arm64. A persistent deployment needs Konifer, PostgreSQL for
asset records, and S3-compatible storage or a filesystem for originals and generated variants. If your
team already operates PostgreSQL and object storage, you can use that infrastructure for Konifer.
Image processing, background variant generation, and inference (if enabled) run inside the Konifer container. Put your CDN in front for image delivery.
Start with one instance and scale horizontally by adding replicas behind a load balancer. Instances share PostgreSQL and image storage. Each instance is stateless. Filesystem deployments require a shared persistent mount accessible to all replicas.
| Deployment concern | Documentation |
|---|---|
| Container setup, networking, replicas, and upgrades | Deployment guide |
| PostgreSQL and image storage | Storage configuration |
| CPU, memory, temporary storage, and worker concurrency | Resource tuning |
| CDN behavior and fetch URL protection | HTTP caching and URL signing |
Konifer fits teams that want to own the image lifecycle for avatars, product galleries, tenant branding, or other application assets. If you already have source-image URLs and just want on-the-fly resizing and format conversion, consider an image processor such as imgproxy or imagor. Choose a managed image platform if you want a provider to host and manage your delivery infrastructure. See Who should use Konifer? for more detail.
Image formats and placeholders. Process JPEG, PNG, WebP, HEIC, AVIF, JPEG XL, and GIF, including animated GIF and WebP. Generate BlurHash and ThumbHash placeholders. See the transformation reference.
Pixels for vision workers. Request encoded display images and resized raw pixel buffers from the same stored source. Named profiles define dimensions, orientation, color space, channel order, and HWC or CHW layout. Workers handle tensor construction and model-specific scaling and normalization. See the raw pixel contract and PyTorch guide.
Content classification. Install the optional SigLIP2 model pack to accept, reject, or label uploads using text prompts, with inference inside the server process. Test prompts and thresholds through the Rule Evaluation API before applying upload rules.
Konifer ships as a Docker image. For local development, install the native dependencies and download the SigLIP2 model pack if you work on inference or its tests. CONTRIBUTING.md has the setup steps, Gradle tasks, and macOS notes.
Konifer builds on these open-source projects:
Evaluating Konifer for your application? Email me at daniel@konifer.io or start a discussion. I'd like to hear what you're building and what would block adoption.
The Konifer server is released under the AGPL license in LICENSE.
The Konifer client and common module are licensed under Apache 2.0 license in LICENSE and LICENSE, respectively.
The self-hosted image backend your application doesn't have to build.
Adding image uploads means more than putting files in a bucket. Your team needs validation, thumbnails, replacement behavior, metadata, cache rules, and deletion across storage and application records. Konifer provides those capabilities through one HTTP API so you can spend less time building and maintaining image infrastructure.
Use your storage and CDN, and choose image paths that fit your application. Address a profile picture by user, a gallery by product, or an individual image by ID. Group related images under shared paths to apply storage and processing policies and delete them together.
Deploy Konifer alongside PostgreSQL and S3-compatible storage or a persistent filesystem. Image processing and background variant generation run inside Konifer.
10-minute quickstart · Documentation · Deployment · Performance report
I've seen the same story on several teams: someone needs to store a product photo, then another feature needs thumbnails, then a third needs different upload limits. Before long, image handling is spread across S3 buckets, Lambdas, queues, and services. Replacing a photo, keeping its history, or deleting a user's images means coordinating those pieces again.
With Konifer, you configure those jobs in one service and keep the image handling code out of individual applications:
You can give avatars, marketplace listings, and tenant branding different storage and processing policies while running the same service.
Run the 1.0 release candidate with in-memory storage:
docker run --name konifer-quickstart \
--publish 8080:8080 \
--env IN_MEMORY=true \
ghcr.io/dmaiken/konifer:1.0.0-rc.1In-memory mode loses all uploaded images and metadata when the container stops.
Follow the 10-minute quickstart to upload, transform, and replace your first image.
You define the paths you use to store and retrieve images. Use a resource path such as
/assets/users/123/profile-picture to address a user's current picture. Construct its URL from the user ID without
storing a separate image reference:
POST /assets/users/123/profile-picture
GET /assets/users/123/profile-picture/-/content?width=256&format=webp
GET /assets/users/123/profile-picture/-/infoUse an image ID of your choosing when you want an independent image reference. Combine image IDs with resource paths to organize individual images within a user's collection:
POST /assets/{imageId}
GET /assets/{imageId}/-/content
POST /assets/users/123/images/{imageId}
GET /assets/users/123/images/{imageId}/-/contentEach upload gets a Konifer entryId within its chosen path. Use the path to fetch the current image or select an entry
to retrieve a specific version:
GET /assets/users/123/profile-picture/-/entry/0/contentShared parent paths give you a way to configure policies and manage related images. Apply upload limits to user
images, choose a bucket for profile pictures, or delete a user's images through one request. If user 123 closes their
account, delete the images below users/123 without assembling a list of individual image IDs:
POST /assets/users/123/profile-picture
POST /assets/users/123/images/{imageId}
DELETE /assets/users/123/-/recursiveSee the asset model for collections, upload history, and entry selection.
Define storage and processing rules in konifer.conf so callers can upload and fetch images without repeating the
policy for each image category. This example limits user images to 15 megapixels, stores profile pictures in a
dedicated bucket, and generates a WebP thumbnail after upload. Requests for transformed profile pictures must use the
named profile:
variant-profiles {
thumbnail {
width = 256
height = 256
fit = fill
rotate = auto
format = webp
}
}
paths {
"/users/**" {
limits {
max-pixels = 15MP
}
}
"/users/*/profile-picture" {
object-store {
bucket = profiles
}
transform {
eager-variants = [thumbnail]
on-demand-variant {
mode = profile_only
}
}
}
}Mount your configuration at /app/config/konifer.conf. With S3-compatible storage, create the profiles bucket before
using this example. See the deployment guide for the storage setup.
Fetch the thumbnail with:
GET /assets/users/123/profile-picture/-/content?profile=thumbnailProfile pictures inherit the pixel limit from /users/**. Add more specific rules for other image categories to
choose their buckets, accepted formats, variant generation, caching, and delivery behavior. The
path configuration docs cover matching and inheritance.
Konifer ships as a Docker image for Linux amd64 and arm64. A persistent deployment needs Konifer, PostgreSQL for
asset records, and S3-compatible storage or a filesystem for originals and generated variants. If your
team already operates PostgreSQL and object storage, you can use that infrastructure for Konifer.
Image processing, background variant generation, and inference (if enabled) run inside the Konifer container. Put your CDN in front for image delivery.
Start with one instance and scale horizontally by adding replicas behind a load balancer. Instances share PostgreSQL and image storage. Each instance is stateless. Filesystem deployments require a shared persistent mount accessible to all replicas.
| Deployment concern | Documentation |
|---|---|
| Container setup, networking, replicas, and upgrades | Deployment guide |
| PostgreSQL and image storage | Storage configuration |
| CPU, memory, temporary storage, and worker concurrency | Resource tuning |
| CDN behavior and fetch URL protection | HTTP caching and URL signing |
Konifer fits teams that want to own the image lifecycle for avatars, product galleries, tenant branding, or other application assets. If you already have source-image URLs and just want on-the-fly resizing and format conversion, consider an image processor such as imgproxy or imagor. Choose a managed image platform if you want a provider to host and manage your delivery infrastructure. See Who should use Konifer? for more detail.
Image formats and placeholders. Process JPEG, PNG, WebP, HEIC, AVIF, JPEG XL, and GIF, including animated GIF and WebP. Generate BlurHash and ThumbHash placeholders. See the transformation reference.
Pixels for vision workers. Request encoded display images and resized raw pixel buffers from the same stored source. Named profiles define dimensions, orientation, color space, channel order, and HWC or CHW layout. Workers handle tensor construction and model-specific scaling and normalization. See the raw pixel contract and PyTorch guide.
Content classification. Install the optional SigLIP2 model pack to accept, reject, or label uploads using text prompts, with inference inside the server process. Test prompts and thresholds through the Rule Evaluation API before applying upload rules.
Konifer ships as a Docker image. For local development, install the native dependencies and download the SigLIP2 model pack if you work on inference or its tests. CONTRIBUTING.md has the setup steps, Gradle tasks, and macOS notes.
Konifer builds on these open-source projects:
Evaluating Konifer for your application? Email me at daniel@konifer.io or start a discussion. I'd like to hear what you're building and what would block adoption.
The Konifer server is released under the AGPL license in LICENSE.
The Konifer client and common module are licensed under Apache 2.0 license in LICENSE and LICENSE, respectively.