Skip to content
An image manipulation script for Wordpress
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
_config.yml
class-lemon-image.php

README.md

Ari_Image

An image manipulation script for Wordpress.

Handles downscaling, upscaling, cropping, and also creating retina images.

Usage:

$image  = Ari_Image::create( $image_url_or_id );
$resize = $image->resize( array( 'width' => 500, 'height' => 300 ) );

$new_url = $resize['url'];

Arguments for the resize method:

array(
  'width'     => '',
  'height'    => '',
  'crop'      => true,
  'retina'    => true,
  'resize'    => true,
);
  • If you only define width or height the image will be resized using the original ratio. The missing value will be autocalculated.
  • If you define both width & height then the image will be resized & cropped to the defined dimensions unless crop is set to false.
  • If retina is set to true (default) then an extra file will be created using the @2x suffix.
You can’t perform that action at this time.