Skip to content

yet another express microservice to Transform and stream remote images

License

Notifications You must be signed in to change notification settings

ahashem/image-optimizer

Repository files navigation

Image optimization service

CI Build

Development

  • Use current node version from .nvmrc file $> nvm install, or make sure you've at least Node 12.x installed
  • Next run $> npm install
  • Start Dev server with $> npm run dev
  • Open the sample HTML example in browser. examples/frontend/simple-resize.html
  • For Production ready build: $> npm run build && npm start

API

  • In HTML; use
<img src="http://image-optimizer-service/widthxheight/https://path-to-hosted-image.jpg" >
  • HTTP request:
$> curl --request GET -sL \
     --url 'http://image-optimizer-service/widthxheight/https://path-to-hosted-image.jpg' \
     --output './path/to/file'

Roadmap

  • NodeJS API-first microservice; created using personal template repository
  • Health check endpoints
  • CI checks for build
  • Happy scenario image fetching and resizing API using Sharp
  • Dockerfile
  • Added security layer (with URL tokens and/or hashing)
  • Usage patterns: (e.g with CDN, with caching layer and proxy-server, serverless approach)
  • Telemetry support
  • Logging Middleware
  • API versioning
  • Deployment descriptors
  • Continuous Deployments support

Caveats

TBD

On the shoulders of Giants

This NodeJS implementation is far from done. It's inspired by years of working and tinkering with other solutions such as:

Long live and prosper

About

yet another express microservice to Transform and stream remote images

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published