Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Resizing images using ImageMagick
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app/models
features/support
lib/tasks
public/images/cy_image/cache
spec
README.rdoc
Rakefile
cy_image_extension.rb

README.rdoc

CyImage Radiant Extension

CyImage extension can be used to implement on-fly image resizing using ImageMagick directly on your Radiant pages.

Requirements

  1. ImageMagick should be installed

  2. RMagick ruby gem should be installed (gem install rmagick)

Installation

cd vendor/extensions  
git clone git://github.com/ConstantineYurevich/radiant-cy-image-extension.git cy_image
rake radiant:extensions:cy_image:update

Usage

Creating thumbnail with defined width and height:

<r:cy_image:thumbnail src="/images/test.jpg" height="100" width="100" alt="Test image" />

Disproportionate resize with defined width and height:

<r:cy_image:resize src="/images/test.jpg" height="100" width="100" alt="Test image" />

Proportional resize with defined either width or height:

<r:cy_image:resize src="/images/test.jpg" width="100" alt="Test image" />
<r:cy_image:resize src="/images/test.jpg" height="100" alt="Test image" />

Each tag will generate appx. the following code:

<img src="/images/cy_image/cache/test_cfd24216cc89c683a44574931c3da509.jpg" height="100" alt="Test image" width="100" />

Where “/images/cy_image/cache/test_cfd24216cc89c683a44574931c3da509.jpg” is chached path of modified/resized/cropped image.

Something went wrong with that request. Please try again.