Jump to main content Jump to doc navigation

What is RezImgCrop?

RezImgCrop is a custom Output Filter for MODX Revolution that can reduce images, cut off and grayscale them. It is often while articles or news are being added on a site that images turn out different, in design accurate images very well look. This filter does not break a proportion of the image and creates a folder "rezcrop" in a image folder and saves images with a unique name, so that the system at repeated reversal could give already processed result even if a storage cache was cleared.

Requirements

  • MODX Revolution 2.2.x or later
  • TV output Type: the Text

History

RezImgCrop was written by valikras and released on Jun 09, 2011.

Download

It can be downloaded from within the MODX Revolution manager via Package Management, or from the MODX Extras Repository, here: https://modx.com/extras/package/rezimgcrop2

Attributes

  • r - does decreases of the image,
  • c - does cropping of the image,
  • g - Color image conversion in a shade of gray, WxH - w = width, H = height (in pixels)

Usage examples

Resize on width and cropping:

[[*tv.images:rezimgcrop=`r-150x,c-150x75`]]

We do resize images, then cropping and a shade of gray:

[[*tv.images:rezimgcrop=`r-150x,c-150x75,g-`]]

Resize min 150px:

[[*tv.images:rezimgcrop=`min-150`]]

Resize min 150px, then cropping:

[[*tv.images:rezimgcrop=`min-150,c-150x150`]]

Resize on width:

[[*tv.images:rezimgcrop=`r-150x`]]

Resize on width:

[[*tv.images:rezimgcrop=`r-150x0`]]

Resize on height:

[[*tv.images:rezimgcrop=`r-0x75`]]

Resize on height:

[[*tv.images:rezimgcrop=`r-x75`]]

If we specify two parameters of reduction of the image the image to decrease not proportionally, it is necessary to specify better width, then to apply crop.

[[*tv.images:rezimgcrop=`r-150x75`]]

Support the team building MODX with a monthly donation.

The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.

Backers

  • modmore
  • STERC
  • Digital Penguin
  • Jens Wittmann – Gestaltung & Entwicklung
  • Fabian Christen
  • Dannevang Digital
  • Sepia River Studios
  • CrewMark
  • Chris Fickling
  • deJaya
  • eydolan
  • Following Sea
  • Lefthandmedia
  • Murray Wood
  • Anton Tarasov
  • Stéphane Jäggi
  • Raffy
  • Snow Creative
  • Nick Clark
  • A. Moreno
  • JT Skaggs
  • Helen
  • YJ
  • krisznet
  • Richard
  • Yanni

Budget

$311 per month—let's make that $500!

Learn more