trive / module-adaptive-resize
Resize image with crop functionality fot Magento 2 extension
Installs: 475
Dependents: 0
Suggesters: 0
Security: 0
Stars: 16
Watchers: 5
Forks: 9
Open Issues: 1
Type:magento2-module
Requires
- php: ~5.6.0|~7.0.0
This package is not auto-updated.
Last update: 2025-01-13 16:44:43 UTC
README
Based on (AdaptiveResize)[https://github.com/obukhow/AdaptiveResize] for Magento 1
Examples:
- $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);
You can use following parameters with setCropPosition function:
- top
- top-left
- top-right
- bottom
- bottom-left
- bottom-right
- center
- center-left
- center-right