承接 shinetech/magento2-image-optimizer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

shinetech/magento2-image-optimizer

Composer 安装命令:

composer require shinetech/magento2-image-optimizer

包简介

Magento 2 Image optimizer wrapper build on https://github.com/spatie/image-optimize

README 文档

README

This Magento 2 module is a wrapper based on the package Spatie Image optimizer.

Installation

  • composer require shinetech/magento2-image-optimizer
  • bin/magento module:enable JustBetter_ImageOptimizer
  • bin/magento setup:upgrade && bin/magento setup:static-content:deploy

Optimize all images in console

  • Run bin/magento justbetter:imageoptimizer:optimizeall to resize all images in the media folder.
  • Additional parameters (will overwrite any option in the magento config):
    • --jpg_compression="85"
    • --jpg_strip_all="1"
    • --jpg_all_progressive="0"
    • --png_quality_min_max="10-15"
    • --png_interlace="0"
    • --png_optimization_level="8"

Optimization tools

The package will use these optimizers if they are present on your system:

Here's how to install all the optimizers on Ubuntu:

sudo apt-get install jpegoptim
sudo apt-get install optipng
sudo apt-get install pngquant
sudo npm install -g svgo
sudo apt-get install gifsicle

And here's how to install the binaries on MacOS (using Homebrew):

brew install jpegoptim
brew install optipng
brew install pngquant
brew install svgo
brew install gifsicle

Configuration

  • Options for the module are defined in the backend under Stores > Configuration > JustBetter > Image optimizer configuration.
  • Possible options:
    • Log the compression in the system.log
    • Change compression of jpg files
    • Change compression of png files

Compatibility

The module is tested on magento version 2.2.x with Spatie image optimizer version 1.0.x

Ideas, bugs or suggestions?

Please create a issue or a pull request.

Todo

  • Configurable options for compression
  • Compress all library images in console command

About us

We’re a innovative development agency from The Netherlands building awesome websites, webshops and web applications with Laravel and Magento. Check out our website justbetter.nl and our open source projects.

License

MIT

JustBetter logo

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固