承接 blackbird-agency/magento2-module-image-resizer 相关项目开发

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

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

blackbird-agency/magento2-module-image-resizer

最新稳定版本:2.1.2

Composer 安装命令:

composer require blackbird-agency/magento2-module-image-resizer

包简介

Magento 2 Module to add simple image resizing capabilities in all blocks and .phtml templates

README 文档

README

Magento 2 Module to add simple image resizing capabilities in all blocks and .phtml templates

Installation

$ composer config "repositories.magento2-module-image-resizer" "vcs" "git@github.com:IndieGroup/magento2-module-image-resizer.git"  
$ composer require "staempfli/magento2-module-image-resizer":"~2.0"

Usage

imageResizer is automatically available in all frontend Blocks. You can resize your images just calling a method:

/** @var \Staempfli\ImageResizer\Model\Resizer $imageResizer */
$imageResizer = $block->getImageResizer();
$resizedImageUrl = $imageResizer->resizeAndGetUrl(<originalImageUrl>, $width, $height, [$resizeSettings]); 

You can do that directly on the .phtml or in your custom Block.

Cache

Resized images are saved in cache to improve performance. That way, if an image was already resized, we just use the one in cache.

If you need to, you can clear the resized images cache on the Admin Cache Management

Admin Clear Resized Images Cache

Prerequisites

  • PHP >= 7.0.*
  • Magento >= 2.1.*

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2023-02-06