trive / module-adaptive-resize
用于 Magento 2 扩展的带有裁剪功能的图片调整大小
1.0.0
2017-02-16 10:36 UTC
Requires
- php: ~5.6.0|~7.0.0
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
示例
- $this->helper('Trive\AdaptiveResize\Helper\Image')->init($_product)->adaptiveResize(240,300);
- $this->helper('Trive\AdaptiveResize\Helper\Image')->init($_product,'category_page_grid')->adaptiveResize(240,300);
- $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