Socket
Book a DemoInstallSign in
Socket

github.com/zjc17/exif-web

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/zjc17/exif-web

v0.3.1
Source
Go
Version published
Created
Source

Exif Web

CodeQL Security Scan Release Go Report Card Docker Image

FeaturesDownloadDemoUsageFutureConfigurationCredit

ENGLISH | 中文文档

Lightweight Opensource Exif Analytic Backend written in Golang, with binary size < 15MB.

Support Restfull API, WebUI, x86, ARM, Linux, macOS.

Features

  • 🏎️ Utilized fastest and wildly used EXIF Javascript lib.
  • 📷 Files: .jpg, .tif, .png, .heic, .avif, .iiq
  • 📑 Reads only first few bytes for a given url or image data.
  • 🗜️ Easy to deploy: one cross-platform binary file or docker to deploy.
  • Lightweight cache / persistent storage by sqlite.

Download

Download the binaries for your system and architecture from the releases page.

If you use docker, you can use the following command (Dockerhub)

docker pull lovecho/exif-web:latest

Demo

You can also check the live demo here exif.gotool.tech

Usage

Use default parameters launch the api server:

./exif-web

WebUI Usage

After start exif-web, open the webui at localhost:8080, then

  • upload you local image
  • or parse remote image by Restful API

Restful API Usage

Parse a remote image with its uri

curl 'http://127.0.0.1:8080/api/v1/parse?url=$IMAGE_URL'

Docker Usage

There is no difference between using parameters in Docker and the above, for example, we start a Web UI formatting tool service in Docker:

docker run --rm -it -p 8080:8080 lovecho/exif-web:latest

Docker Compose

You can find the docker-compose.yml file at docker/docker-compose.yml in project.

Feel free to customise it.

As an external library

Install dependency

go get github.com/zjc17/exif-web
package main

import (
	"fmt"
	"github.com/zjc17/exif-web/pkg/fetcher"
	"github.com/zjc17/exif-web/pkg/parser"
)

func main() {
	url := ""
	image, _ := fetcher.GetImagePartial(url, nil)
	p := parser.NewParser()
	result, _ := p.Parse(image)
	fmt.Printf("%+v", result)
}

Future

  • Support read image on local filesystem
  • A simple web ui as live demo
  • A simple built-in k/v caching system to prevent duplication of parsing

Configuration

Environment variables:

NameDefaultDescription
EXIF_WEB_SQLITE_PATH/tmp/exif-web.sqlite3sqlite file path

Credit

Exif parse components:

  • exifr: The fastest and most versatile JavaScript EXIF reading library, under [MIT license]
  • modified javascript version for golang execution, under [Apache-2.0 license], 28/04/2023:

Runtime dependent components:

  • goja: ECMAScript 5.1(+) implementation in Go, under [MIT license].

Web components:

  • Gin: a HTTP web framework written in Go (Golang), under [MIT license]

WebUI components:

  • Crayons: A UI Kit comprising of web components for building Freshworks Apps! - [License not specified yet]

FAQs

Package last updated on 29 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.