iqnection-modules/image-utilities

IQnection SilverStripe Image Utilities Module

1.0.0 2021-04-07 14:00 UTC

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"