定制 christophlehmann/imgproxy 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

christophlehmann/imgproxy

最新稳定版本:0.0.3

Composer 安装命令:

composer require christophlehmann/imgproxy

包简介

TYPO3 Extension for serving images with imgproxy.

README 文档

README

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

统计信息

  • 总下载量: 31.09k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 15
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 15
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2022-03-10