Skip to content

Adds cropping capabilities for images to MODX

Notifications You must be signed in to change notification settings

labr1005/imagecropper

 
 

Repository files navigation

MODX ImageCropper

ImageCropper version MODX Extra by Sterc MODX version requirements

Install the ImageCropper extra for image TV with a crop function.

Example snippet call

{'!ImageCropper' | snippet : [
    'image          => $_modx->resource.imagecropper,
    'usePdoTools'   => true,
    'tpl'           => '@FILE elements/chunks/imagefenom.chunk.tpl'
]}

Parameters

Parameter Description
image The value of the TV
field [optional] The key of the image to return, for example mobile.
tpl [optional] The image template. This can be a chunk , @FILE or @INLINE
usePdoTools [optional] Set to true to use pdoTools in the tpl's and enable fenom. (@FILE and @INLINE do not require this). Default: false
usePdoElementsPath [optional] Set to true to use the system setting pdotools_elements_path as a base-path for the @FILE includes. If false, it uses core/components/imagecropper/. Default: false

Migration

After installing & setting the TV's you can run the following migrate script to migrate existing values to the new format: The required hash can be found after install in your system settings.

php /assets/components/imagecropper/migration/imagecropper.migrate.php --hash=

About

Adds cropping capabilities for images to MODX

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 74.6%
  • PHP 19.4%
  • CSS 4.3%
  • Smarty 1.7%