GithubHelp home page GithubHelp logo

neoskop / ixy Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 1.41 MB

An image proxy that can resize images from an upstream server and store the source and target images locally for quick response times.

License: MIT License

Dockerfile 1.76% JavaScript 4.64% Shell 18.16% TypeScript 57.23% Smarty 6.47% CSS 3.37% HTML 0.83% Svelte 7.54%

ixy's Introduction

An image proxy that can resize images from an upstream server and store the source and target images locally for quick response times. In a Kubernetes cluster with multiple replicas ixy synchronizes the source and target images between all replicas.

Quickstart with KinD

$ ./scripts/quickstart.sh
$ google-chrome http://127.0.0.1:30080 # UI
$ curl -o /dev/null \
       -s \
       -w 'Establish Connection: %{time_connect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n' \
       http://127.0.0.1:8080/200/200/300/300

Quickstart with Docker

$ docker compose up &
$ curl -o /dev/null \
       -s \
       -w 'Establish Connection: %{time_connect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n' \
       http://127.0.0.1:8080/200/200/300/300

Usage

The URL are parsed as followed:

http://127.0.0.1:8080/200/200/g:n/300/300
                     |___|___|___|_______|
                       |   |   |     |
target image width ----+   |   |     |
target image height -------+   |     |
gravity for crop: center ------+     |
source image path -------------------+

If image width or height is set to 0 the aspect ratio is retained. If both are 0 the source image is returned.

The gravity (g) argument is optional and it can also take the following values:

  • n: North
  • e: East
  • w: West
  • s: South

Instead of gravity you can also use a strategy (s) argument:

  • a: Attention
  • e: Entropy

For more details on how crops are applied with these arguments read the Sharp documentation.

UI

The UI is only available in Kubernetes environment and will reflect the available pods and their synchronization states:

ixy-ui

Environment variables

  • DEBUG: Enable debug logging
  • BASE_URL: The base URL of the upstream server
  • MAX_WIDTH: The maximum width of the target image (Default: 2000)
  • MAX_HEIGHT: The maximum height of the target image (Default: 2000)
  • MAX_SIZE: The maximum size of the source image in megabytes (Default: 5)
  • REVALIDATE_TIME: The time in minutes for checking the source image for changes after its last access (Default: 30)
  • TIMEOUT: The timeout in seconds when fetching source images (Default: 15)
  • MAX_REDIRECTS: The maximum number of redirects when fetching source images (Default: 5)
  • CACHE_DIR: The directory to store the source and target images in (Default: /home/node/cache)
  • CACHE_CONTROL_MAX_AGE: The maximum age of the cache in days (Default: 365)

ixy's People

Contributors

renovate[bot] avatar arnediekmann avatar

Watchers

 avatar Jannick Reymann avatar  avatar

ixy's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): lock file maintenance

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker-compose.yaml
dockerfile
backend/Dockerfile
  • node 21.7.3-bookworm
frontend/Dockerfile
  • node 21.7.3-bookworm
helm-values
helm/values.yaml
npm
backend/package.json
  • @fastify/etag 5.2.0
  • @fastify/static 7.0.4
  • @kubernetes/client-node 0.20.0
  • @nestjs/common ^10.3.8
  • @nestjs/config 3.2.3
  • @nestjs/core ^10.3.8
  • @nestjs/platform-fastify 10.4.1
  • async 3.2.6
  • axios 1.7.5
  • chalk 5.3.0
  • fast-glob 3.3.2
  • fastify 4.28.1
  • p-retry 6.2.0
  • reflect-metadata ^0.2.2
  • rxjs ^7.8.1
  • sharp 0.33.3
  • @nestjs/cli ^10.3.2
  • @nestjs/schematics ^10.1.1
  • @nestjs/testing ^10.3.8
  • @types/async 3.2.24
  • @types/jest ^29.5.12
  • @types/node ^20.12.8
  • @types/supertest ^6.0.2
  • @typescript-eslint/eslint-plugin ^7.8.0
  • @typescript-eslint/parser ^7.8.0
  • eslint 8.57.0
  • eslint-config-prettier ^9.1.0
  • eslint-plugin-prettier ^5.1.3
  • jest ^29.7.0
  • prettier ^3.2.5
  • source-map-support ^0.5.21
  • supertest ^7.0.0
  • ts-jest ^29.1.2
  • ts-loader ^9.5.1
  • ts-node ^10.9.2
  • tsconfig-paths ^4.2.0
  • typescript ^5.4.5
frontend/package.json
  • pretty-bytes 6.1.1
  • @sveltejs/adapter-auto ^3.2.0
  • @sveltejs/adapter-node 5.2.2
  • @sveltejs/kit ^2.5.7
  • @sveltejs/vite-plugin-svelte ^3.1.0
  • @types/eslint 8.56.11
  • @typescript-eslint/eslint-plugin ^7.8.0
  • @typescript-eslint/parser ^7.8.0
  • eslint ^8.57.0
  • eslint-config-prettier ^9.1.0
  • eslint-plugin-svelte ^2.38.0
  • prettier ^3.2.5
  • prettier-plugin-svelte ^3.2.3
  • svelte ^4.2.15
  • svelte-check ^3.7.0
  • tslib ^2.6.2
  • typescript ^5.4.5
  • vite ^5.2.11

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.