trive / module-adaptive-resize

用于 Magento 2 扩展的带有裁剪功能的图片调整大小

安装: 474

依赖项: 0

建议者: 0

安全性: 0

星标: 16

关注者: 5

分支: 9

开放问题: 1

类型:magento2-module

1.0.0 2017-02-16 10:36 UTC

This package is not auto-updated.

Last update: 2024-09-23 15:05:25 UTC


README

基于 (AdaptiveResize)[https://github.com/obukhow/AdaptiveResize] for Magento 1

示例

  1. $this->helper('Trive\AdaptiveResize\Helper\Image')->init($_product)->adaptiveResize(240,300);
  2. $this->helper('Trive\AdaptiveResize\Helper\Image')->init($_product,'category_page_grid')->adaptiveResize(240,300);
  3. $this->helper('Trive\AdaptiveResize\Helper\Image')->init($_product,'category_page_grid')->setCropPosition('top')->adaptiveResize(240);

您可以使用以下参数与 setCropPosition 函数一起使用

  • top
  • top-left
  • top-right
  • bottom
  • bottom-left
  • bottom-right
  • center
  • center-left
  • center-right