Godinary
Image proxy with live resize & tranformations
Install / Use
/learn @trilopin/GodinaryREADME
NOTE: This is a project I did to practise with Go when I was learning the language, please don't use it in production.
godinary
Image proxy with live resize & tranformations
Install
git clone https://github.com/trilopin/godinary
Docker flow:
- make build
- docker run --rm -p 3002:3002 --env-file .env -ti godinary:latest
Development flow:
Without SSl and with gin live reloading in port 3000:
- mkdir data && cp .env.example .env
- make build-dev
- make run
Run tests
- make build-test
Configuration
Variables can be passed as arguments or as env vars (uppercase and with GODINARY_ prefix)
$ godinary -h
Usage of godinary:
--allow_hosts string Domains authorized to ask godinary separated by commas (A comma at the end allows empty referers)
--cdn_ttl string Number of seconds images wil be cached in CDN (default "604800")
--domain string Domain to validate with Host header, it will deny any other request (if port is not standard must be passed as host:port)
--fs_base string FS option: Base dir for filesystem storage
--gce_project string GS option: Sentry DSN for error tracking
--gs_bucket string GS option: Bucket name
--gs_credentials string GS option: Path to service account file with Google Storage credentials
--max_request int Maximum number of simultaneous downloads (default 100)
--max_request_domain int Maximum number of simultaneous downloads per domain (default 10)
--port string Port where the https server listen (default "3002")
--release string Release hash to notify sentry
--sentry_url string Sentry DSN for error tracking
--ssl_dir string Path to directory with server.key and server.pem SSL files (default "/app/")
--storage string Storage type: 'gs' for google storage or 'fs' for filesystem (default "fs")
Use it
http://localhost:3002/image/fetch/w_500/https://www.drupal.org/files/project-images/simplemeta2.png
Parameters:
- type fetch -> last param is target URL
- w: max width
- h: max height
- c: crop type (scale, fit and limit allowed)
- f: format (jpg, jpeg, png, gif, webp and auto allowed)
- q: quality (75 by default)
Related Skills
node-connect
339.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
xurl
339.3kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
