brocode/module-image-optimizer-queue 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

brocode/module-image-optimizer-queue

Composer 安装命令:

composer require brocode/module-image-optimizer-queue

包简介

Magento 2 module adaption for generating asynchron messages for image optimization, based on internal Mysql Queue

README 文档

README

📖 Full docs, design notes & production guidance: brocode.at/modules/module-image-optimizer Part of the BroCode Image Optimizer family for Magento 2.

This module provides a queue configuration for asynchronous image conversions in Magento 2. It is based on the brocode/module-image-optimizer

Goals of this module:

  • Use of Magento 2 basic MySQL queue framework to
    • publish image files that need to be converted
    • consume image conversion message and asynchronously convert them to the target format

"Buy Me A Coffee"

Requirements

  • Magento 2.4.x
  • Web server: nginx (the only server Adobe supports from 2.4.9; nginx 1.30). Apache config is included for older installs, but Apache was dropped from Magento's tested requirements at 2.4.8-p3 / 2.4.7-p7.
  • PHP 8.3 / 8.4 (8.5 on 2.4.9)

Installation

composer require brocode/module-image-optimizer-queue
bin/magento module:enable BroCode_ImageQueueOptimizer
bin/magento setup:upgrade

Configuration

Basically nothing has to be configured and should run out of the box.

Any image needed to be converted is scanned with a cron job from the base module and published to the configured queue instead of a direct conversion.

To consume any conversion event published, you can manually start the queue consumer via the Magento CLI:

bin/magento queue:consumers:start BroCodeImageConversionConsumer

Consider using supervisor or any other process manager to keep the consumer running.

Define multiprocess consumer Every consumer queue can be locked in Magento 2, to enable multiple conversion processes, following snippet can be added to the env.php to execute 5 conversion consumer parallel on every cron execution:

    'cron_consumers_runner' => [
        'consumers' => [
            'BroCodeImageConversionConsumer'
        ],
        'multiple_processes' => [
            'BroCodeImageConversionConsumer' => 5
        ]
    ],

Module family

Module Purpose
module-image-optimizer Base: scan pub/media, write modern-format sidecars
module-image-optimizer-webp WebP converter
module-image-optimizer-avif AVIF converter
module-image-optimizer-queue Async conversion via the Magento queue
module-image-optimizer-amqp Async conversion over RabbitMQ/AMQP

Docs & guides: brocode.at

brocode/module-image-optimizer-queue 适用场景与选型建议

brocode/module-image-optimizer-queue 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 06 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 brocode/module-image-optimizer-queue 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 brocode/module-image-optimizer-queue 我们能提供哪些服务?
定制开发 / 二次开发

基于 brocode/module-image-optimizer-queue 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-06-28