Skip to content
/ goexiftool Public

Go bindings to Perl exiftool using wazero and zeroperl

License

Notifications You must be signed in to change notification settings

lbe/goexiftool

Repository files navigation

goexiftool

A Go application that provides an HTTP API for interacting with ExifTool, powered by a WebAssembly version of Perl.

NOTE: At this time, this is nothing but a bit of a placeholder for me to assemble my thoughts and get started. Everything is subject to change! --lbe

Features

  • Provides a simple HTTP API to access ExifTool functionality.
  • Uses a WASM-based Perl runtime (zeroperl) for sandboxed execution.
  • Containerized with Docker for easy deployment.
  • Includes observability with Prometheus, Grafana, Jaeger, and Loki via docker-compose.

API Endpoints

  • /healthz: Returns ok if the server is running.
  • /version: Returns the ExifTool version.

Getting Started

Prerequisites

  • Go 1.25 or later
  • Docker (for running the containerized version)
  • make

Running Locally

  1. Clone the repository:

    git clone <repository-url>
    cd goexiftool
  2. Install development tools:

    make setup
  3. Run the server:

    go run cmd/server/main.go

    The server will be available at http://localhost:8080.

Running with Docker

  1. Build the Docker image:

    docker build -t goexiftool:latest .
  2. Run the container:

    docker run -p 8080:8080 goexiftool:latest

Running with Docker Compose

The included docker-compose.yml file will start the goexiftool service along with Prometheus, Grafana, Jaeger, and Loki.

docker-compose up
  • Grafana: http://localhost:3000
  • Prometheus: http://localhost:9090
  • Jaeger: http://localhost:16686
  • Loki: http://localhost:3100

Development

This project uses make to streamline common development tasks.

  • make build: Build the application.
  • make test: Run all tests.
  • make cover: Generate and view code coverage.
  • make fmt: Format the code.
  • make tidy: Tidy Go modules.
  • make lint: Run the linter.
  • make ci: Run the full CI pipeline (format, tidy, lint, test, cover).

Motivation

As a long time Perl coder I have used Phil Harvey's Image::ExifTool for decades. IMHO it sets the gold standard for tools to read/write image metadata. About 2 years ago, I started writing Go for several command line tools where I needed more performance that I could get out Perl. I recently started a yet to be released photo gallery web applicaton with a hard goal of being independent of CGO. As I looked through the image metadata tools and found a number of tools written in pure Go which could "get me by". Before I event started writing code for any of them, I started missing Image::Exiftool.

But I knew that I needed to make a decision and get going with the metadata features. I made a decision to start with imagemeta. I was able to whip out my MVP for metadata pretty quickly using imagemeta. So I shouldn't complain, whine or snivel. But, what's the fun in that. On October 11, 2025, which watching College Football (Geaux Tigahs!!), I was idly searching and discovered and found Reddit - Built a web interface for exiftool, the CLI for viewing image metadata. Works totally client-side, hopefully useful to people here!. Voila! Now, it just needs to be ported to Go.

Credits

[lucasgelfond/exiftool-web](https://github.com/lucasgelfond/exiftool-web 6over3/exiftool Phil Harvey - Image::ExifToo

About

Go bindings to Perl exiftool using wazero and zeroperl

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published