tinify/magento2
Composer 安装命令:
composer require tinify/magento2
包简介
Make your web shop faster by compressing your JPEG and PNG images. This plugin automatically optimizes your images by integrating with the popular image compression services TinyJPG and TinyPNG.
README 文档
README
Compress JPEG & PNG images for Magento 2
Make your Magento 2 store faster by compressing your JPEG and PNG images.
This plugin automatically optimizes your images by integrating with the popular image compression services TinyJPG and TinyPNG. Learn more about these services on https://tinypng.com/.
Important notice: Magento 2.1.6 includes a different way of generating product images in the cache folder. Magento reports many users with issues in that images are not showing and have posted a notice in their 2.1.6 release notes along with 2 solutions. Be warned when flushing the image cache in Magento 2.1.6: you will most likely need to regenerate a lot of missing images in the cache again afterwards with the catalog:images:resize script and this will take a lot of time. For fresh installs of this extension we recommend you temporarily suspend optimization when regenerating the cache. This can be done by setting the 4 image sizes to “No” on the configuration screen. Afterwards you can set the image sizes back to "Yes" to reenable image optimization for normal operation.
Do you use Magento 1? Download the extension for Magento 1 Community Edition or Magento 1 Enterprise Edition instead.
How does it work?
When you view a product in your webshop, Magento creates different image sizes in its cache folders. This extension will compress these images for you automatically. Any image sizes that are exact duplicates of each other will only be compressed once.
Your product images are uploaded to the TinyJPG or TinyPNG service and analyzed to apply the best possible compression. Based on the content of the image an optimal strategy is chosen. The result is sent back to your Magento webshop and saved in your public media folder.
On average JPEG images are compressed by 40-60% and PNG images by 50-80% without visible loss in quality. Your webshop will load faster for your visitors, and you’ll save storage space and bandwidth!
Screenshot
Example of plugin configuration in Magento 2:
Getting started
Obtain your free API key from https://tinypng.com/developers. The first 500 compressions per month are completely free, no strings attached! As each product will be shown in different sizes, between 50 and 100 products can be uploaded to your Magento webshop and compressed for free. You can also change which of types of image sizes should be compressed.
If you’re a heavy user, you can compress additional images for a small additional fee per image by upgrading your account. You can keep track of the amount of compressions in the Magento 2 configuration section.
Installation
The Magento 2 module can be installed with Composer (https://getcomposer.org/download/). Once the new Magento 2 Marketplace is lauched, it will also be featured there.
From the command line, do the following in your Magento 2 installation directory:
composer require tinify/magento2
php bin/magento setup:upgrade
Contact us
Got questions or feedback? Let us know! Contact us at support@tinypng.com.
Information for plugin contributors
Prerequisites
- PHP 5.5 or newer.
- MySQL 5.6 or newer (integration tests).
- Composer (https://getcomposer.org/download/).
Running the unit tests
composer install
vendor/bin/phpunit
Installing development version of plugin
Make sure to set "minimum-stability": "dev" in composer.json before you start.
composer config repositories.tinify vcs https://github.com/tinify/magento2-plugin
composer require tinify/magento2:dev-master
bin/magento setup:upgrade
License
This software is licensed under the MIT License. View the license.
tinify/magento2 适用场景与选型建议
tinify/magento2 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 46.25k 次下载、GitHub Stars 达 42, 最近一次更新时间为 2016 年 01 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「plugin」 「module」 「compress」 「images」 「magento」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 tinify/magento2 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tinify/magento2 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 tinify/magento2 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
CakePHP 4.x AdminLTE Theme.
A PSR-7 compatible library for making CRUD API endpoints
bootstrap select field module implementing http://silviomoreto.github.io/bootstrap-select/
Yii2 module to manage website content. Kind of a CMS...
Plugin for YOURLS. Default tools to use in some laemmi plugins
Codeurx Modular is simply a package for Laravel to help you create and manage modules.
统计信息
- 总下载量: 46.25k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 43
- 点击次数: 15
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-01-18
