定制 netlogix/nlx-sw-imgproxy 二次开发

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

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

netlogix/nlx-sw-imgproxy

最新稳定版本:1.4.0

Composer 安装命令:

composer require netlogix/nlx-sw-imgproxy

包简介

Plugin to allow shopware to authenticate and support image proxy

README 文档

README

This plugin adds remoteThumbnail support for imgproxy.

Installation

composer require netlogix/nlx-sw-imgproxy

Configuration

You can configure the plugin over the Shopware plugin configuration or add the following configuration to your config/packages/shopware.yaml file:

option default description
enable false
baseUrl null The imgproxy baseUrl
resizeType null The resize type for imgproxy
imageSource null The image source for imgproxy
key null The key for signing a URL
salt null The salt for signing a URL

Only if enable is set to true and baseUrl is defined, the plugin will use imgproxy to generate remote thumbnails.

Only if key and salt are set, the plugin will sign the URLs.

Granular imgproxy configuration

There are two ways to add additional processing options for imgproxy:

imgproxy presets - recommended

Define a default preset in your imgproxy. for example:

IMGPROXY_PRESETS="default=q:85"

Decorate the UrlGenerator::getImagePath extension

You can decorate the UrlGenerator to add additional processing options for imgproxy. This method getImagePath allows you to modify the URL path that is generated by the plugin.

Usage

You need an instance of imgproxy running to use this plugin. You can run it locally or in a docker container darthsim/imgproxy.

You have to enable remote_thumbnails

shopware:
    media:
        remote_thumbnails:
        enable: true

I recommend use the shopware.system_config to configure the plugin.

for example in your config/packages/shopware.yaml file:

shopware:
    system_config:
        default:
            NlxSwImgproxy.config.enable: true
            NlxSwImgproxy.config.baseUrl: 'https://public.imgproxy.domain'
            NlxSwImgproxy.config.key: '%env(IMGPROXY_KEY)%'
            NlxSwImgproxy.config.salt: '%env(IMGPROXY_SALT)%'

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 6
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-14