iqnection-modules / image-utilities
IQnection SilverStripe Image Utilities Module
Installs: 58
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:silverstripe-vendormodule
Requires
- intervention/image: ^2.3
- silverstripe/framework: ^4.1
This package is auto-updated.
Last update: 2024-10-07 21:23:49 UTC
README
Install
composer require iqnection-modules/image-utilities
Additional Methods:
- FillFrom & FillMaxFrom: allows you to crop an image from a desired position, rather than just the center
$MyImage.CropFrom(300,300,'top')
<%-- pulling position from controller --%>
$MyImage.CropFrom(300,300,$CropPosition)
<img src="$MyImage.CropFrom(300,300,'top').URL" />
Configurations
If not specified in your template, you must add the crop position to your model or controller that's providing the image Defaults to "center"