GithubHelp home page GithubHelp logo

christophlehmann / imgproxy Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 1.0 14 KB

TYPO3 Extension for imgproxy. Render images async and deliver them in new formats like avif and webp when the client supports them

PHP 100.00%
typo3 imgproxy webvitals compression image-processing

imgproxy's Introduction

TYPO3 Extension: ImgProxy

Use imgproxy to render images asynchronously and serve them in new formats like webp and avif when the client supports them.

Basically TYPO3 now just renders a processing url and imgproxy serves the resulting image. The image processing is really fast compared to GraphicsMagick and ImageMagick and less memory hungry.

It does not store thumbnail informations in sys_file_processedfile nor save generated images locally, so for production usage a caching proxy is highly recommended.

Installation

composer require christophlehmann/imgproxy

Configuration

  • improxyUrl is the url of imgproxy.
  • key & salt are used for signing the urls. Generate them with echo $(xxd -g 2 -l 64 -p /dev/random | tr -d '\n').
  • helperUrl can be used to tell imgproxy how it reaches the source image. Handy in development environment: Set it to the projects live url and you don't need the images locally.
  • allowedExtensions List of file extensions that should be handled with imgproxy
  • formatQuality Can be used to define different compressions for avif,webp,.. Default: empty (TYPO3s quality setting is used). Example: jpeg:70:avif:40:webp:60

Run imgproxy locally with docker

  1. Set imgproxyUrl to http://localhost:8080
  2. Set helperUrl to local:/// when the docker container can't reach your local webserver
  3. Start imgproxy
docker run \
  --env IMGPROXY_KEY=*yourkey* \
  --env IMGPROXY_SALT=*yoursalt* \
  --env IMGPROXY_ENABLE_WEBP_DETECTION=true \
  --env IMGPROXY_ENABLE_AVIF_DETECTION=true \
  --env IMGPROXY_LOCAL_FILESYSTEM_ROOT=/data \
  --volume /path/to/documentroot:/data \
  --publish 127.0.0.1:8080:8080 \
  -it darthsim/imgproxy

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.