photofield is a free, open source photo & video editors project written in Go and released under MIT. It has 608 GitHub stars, 15 forks and 35 open issues, and was last pushed 1 months ago. On this registry it ranks #50 of 50 tracked projects in Photo & Video Editors, with 5 head-to-head comparisons available.

What is photofield?

Photofield is a self-hosted, non-invasive, single-binary photo gallery written in Go and released under the MIT licence, intended for people who want to browse very large photo collections quickly on their own hardware.

What it is

Photofield is a photo viewer built to push the limits of how many photos can be displayed at the same time and how fast they appear, with the stated goal of being as fast as or faster than Google Photos on commodity hardware while showing more photos at once. Its API and server-side tile rendering are written in Go, and the front end is built with Vue 3. It ships as a single static binary with optional dependencies, and Docker images are also available. It can be used completely standalone or to complement other photo gallery software.

The concrete problem it solves is browsing a library that already exists, without importing, reorganising or modifying it. Collections are read-only and file-system based: the file system is the source of truth and everything else is a more or less stale cache, which is why a hoster is encouraged to mount photos read-only. Indexing runs at roughly 1000 to 10000 files per second on a fast SSD with a hot cache, while EXIF metadata and prominent colour extraction run as follow-up operations at up to about 200 and 1000 files per second. It replaces the import into a separate gallery database, and it can reuse existing thumbnails from Synology Moments or Photo Station.

Key capabilities

  • Seamless zoomable interface, in which every view can be zoomed to see a little more detail.
  • Progressive multi-resolution loading, rendering a layout from a low-resolution preview up to the full-quality photo.
  • Several layouts for collections of photos, including Timeline and Flex.
  • Local embedded reverse geolocation of roughly 50 thousand places via tinygpkg, supported in the Timeline and Flex layouts.
  • Optional semantic search through photofield-ai, with queries such as "beach sunset", "a couple kissing" or "cat eyes".
  • Tagging (alpha), stored in the cache database and usable to filter photos, plus face detection (alpha) through photofield-ai with a Faces layout and search by face ID.
  • A flexible media and thumbnail system that stores small thumbnails in SQLite, uses FFmpeg for on-the-fly format conversion, extracts embedded thumbnails from JPEG files and decodes lower resolutions with djpeg (libjpeg-turbo).

Who uses it and how

  • Self-hosters with large libraries: the project's own demonstration zooms to a logo within a sample of 43 thousand images from the open-images-dataset on an i7-5820K six-core CPU with an NVMe SSD.
  • Single users or very small households, because much of the normally client-side state is kept on the server and a few simultaneous users can exhaust CPU or memory.
  • Installations where separation between users is handled through directory structure rather than accounts, since there is no authentication or authorization support.
  • Households already running Synology Moments or Photo Station that want existing thumbnails and pre-generated video resolutions reused.
  • Anyone mounting an existing photo share read-only, so the gallery cannot alter the originals.

Getting started

The README points to a Quick Start section and to the documentation at photofield.dev, and deployment is from the single static binary or from the available Docker images. Configuration is covered in the same documentation.

How it compares

No list of paid products replaced by Photofield is given in these facts, but comparison points are named. Google Photos is the performance benchmark the project measures itself against, and Synology Moments and Photo Station are treated as sources of reusable thumbnails rather than as rivals. The project is explicitly designed to work standalone or in complement with other photo gallery software.

When to use it — and when not to

Photofield suits a self-hoster who wants fast browsing of a large, existing library, a read-only relationship with the original files, and is comfortable running the server alongside its cache. The trade-offs are real: the initial load can be slow with a slow CPU and a cold HDD cache, there are no user accounts or permalinks, so deep links may break if the database is removed or files are moved, and on-the-fly video transcoding is not supported. It is a poor fit for multi-user or internet-facing deployments, and tagging and face detection are still labelled alpha.

project readme (upstream, from github) — read inline

Photofield

A self-hosted non-invasive single-binary photo gallery with a focus on speed and simplicity.

Demo · Quick Start · Docs

GitHub Release
GitHub Actions Workflow Status Tech stack: Golang and Vue 3 GitHub Repo stars License Discord

Table of Contents
  1. About
  2. Getting Started
  3. Configuration
  4. Usage
  5. Maintenance
  6. Development Setup
  7. Contributing
  8. License
  9. Acknowledgements

About

Zoom to logo within a 43k images

Zoom to logo within a sample of 43k images from open-images-dataset, i7-5820K 6-Core CPU, NVMe SSD

Photofield is a photo viewer built to mainly push the limits of what is possible in terms of the number of photos visible at the same time and at the speed at which they are displayed. The goal is to be as fast or faster than Google Photos on commodity hardware while displaying more photos at the same time. It is non-invasive and can be used either completely standalone or complementing other photo gallery software.

Features

  • Seamless zoomable interface. Every view is zoomable if you ever need to see just a little more detail.

    Seamless zoom to giraffe face

  • Progressive multi-resolution loading. The whole layout is progressively loaded from a low-res preview to a full quality photo.

    Progressive load of a deer

  • Different layouts. Collections of photos can be displayed with different layouts. layout examples

  • Semantic search using photofield-ai. If enabled, you can search for photo contents using words like "beach sunset", "a couple kissing", or "cat eyes". semantic search for "cat eyes"

  • Tagging (alpha). You can tag and search photos with arbitrary tags. If enabled, tags are stored in the cache database and can be used to filter photos.

  • Face detection (alpha). Detect and display individual faces in your photos using photofield-ai. The Faces layout shows detected face crops, and you can search by face ID.

  • Reverse geolocation. Local, embedded reverse geolocation of ~50 thousand places via tinygpkg with negligible overhead supported in the Timeline and Flex layouts.

  • Flexible media/thumbnail system. Stores small thumbnails using SQLite, uses FFmpeg for on-the-fly format conversion, extracts embedded thumbnails from JPEG files, re-uses Synology Moments / Photo Station thumbnails, and uses djpeg (libjpeg-turbo) to efficiently decode lower resolutions.

  • Single file binary. The server is a single static binary with optional dependencies for easy and flexible deployment (Docker images also available).

  • Read-only file system based collections. The original files are not touched. You are encouraged to even mount your photos as read-only to ensure this. The file system is the source of truth, everything else is just a more or less stale cache.

  • Fast indexing. Thanks to godirwalk, file indexing practically runs at the speed of the file system 1000-10000 files/sec on fast SSD and hot cache. EXIF metadata and prominent color are extracted as separate follow-up operations and run at up to ~200 files/sec and ~1000 files/sec on a fast system.

  • Video support. Videos are supported along with multiple resolutions (if as pre-generated by e.g. Synology Moments), however on-the-fly transcoding is not supported.

Limitations

  • Not optimized for many clients. As a lot of the normally client-side state is kept on the server, you will likely run into CPU or Memory problems with more than a few simultaneous users.
  • No user accounts. Not the focus right now. You can define separate collections for separate users based on the directory structure, but there is no authentication or authorization support.
  • Initial load can be slow. All the photos need to be laid out when you first load a page in a specific window size and configuration, which can take some time with a slow CPU and cold HDD cache.
  • No permalinks. Deep linking to images works, however if you remove the database or move the files around, the links may break.

See the documentation for more information.

Built With

Getting Started

Docker

Make sure you create an empty data directory in the working directory and that you put some photos in a photos directory.

docker run -p 8080:8080 -v "$PWD/data:/app/data" -v "$PWD/photos:/app/photos:ro" ghcr.io/smilyorg/photofield

The cache database will be persisted to the data dir and the app should be accessible at http://localhost:8080. It should show the photos collection by default. For further configuration, create a configuration.yaml in the data dir.

docker-compose.yaml example

This example binds the usual Synology Moments photo directories and assumes a certain path structure, modify to your needs graciously. It also assumes you have configured the /photo and /user directories as collections in the configuration.yaml.

version: '3.3'
services:

  photofield:
    image: ghcr.io/smilyorg/photofield:latest
    ports:
      - 8080:8080
    volumes:
      - /volume1/docker/photofield/data:/app/data
      - /volume1/photo/:/photo:ro
      - /volume1/homes/ExampleUser/Drive/Moments:/exampleuser:ro

Binaries

  1. Download and unpack a release.
  2. Run ./photofield or double-click on photofield.exe to start the server.
  3. Open http://localhost:8080, folders in the working directory will be displayed as collections. 🎉
  • 📝 Create a configuration.yaml in the working dir to configure the app
  • 🕵️‍♀️ Install exiftool and add it to PATH for better metadata support (esp. for video)
  • ⚡ Install djpeg (libjpeg-turbo) for faster JPEG processing (optional but recommended)
  • ⚪ Set environment variables to override defaults:
    • PHOTOFIELD_ADDRESS=:1200 – listen on a different port (default :8080)
    • PHOTOFIELD_DATA_DIR=/path/to/data – change the directory where configuration.yaml and the cache databases are stored

Configuration

You can configure the app via configuration.yaml.

The location of the file depends on the installation method, see Getting Started.

The following is a minimal configuration.yaml example, see defaults.yaml for all options.

collections:
  # Normal Album-type collection
  - name: Vacation Photos
    dirs:
      - /photo/vacation-photos

  # Timeline collection (similar to Google Photos)
  - name: My Timeline
    layout: timeline
    dirs:
      - /photo/myphotos
      - /exampleuser

  # Create collections from sub-directories based on their name
  - expand_subdirs: true
    expand_sort: desc
    dirs:
      - /photo

Development Setup

Prerequisites

  • Go - for the backend / API server
  • Node.js - for the frontend
  • Task - to run common commands conveniently via Taskfile
  • watchexec - for auto-reloading the Go server
  • exiftool - for testing metadata extraction
  • djpeg (libjpeg-turbo) - for optimized JPEG decoding (optional but recommended for better performance)

Scoop (Windows): scoop install go-task exiftool watchexec

Installation

  1. Clone the repo
    git clone https://github.com/smilyorg/photofield.git
    
  2. Install Go dependencies
    go get
    
  3. Install NPM packages
    cd ui
    npm install
    

Running

Run both the API server and the UI server in separate terminals. They are set up to work with each other by default with the API server running at port 8080 and the UI server on port 5173.

task is Task as defined in the prerequisites.

API
  • task watch the source files and auto-reload the server using watchexec
  • or task run the server
UI
  • task ui to start a hot-reloading development server
  • or run from within the ui folder
    cd ui
    npm run dev
    

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

Frequently asked questions

Is photofield free to use?

photofield is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does photofield do?

A self-hosted non-invasive single-binary photo gallery with a focus on speed and simplicity.

What is photofield written in?

photofield is primarily written in Go. Its source is publicly available at https://github.com/SmilyOrg/photofield, and it has 608 GitHub stars.