Skip to content
sy4mil edited this page May 10, 2012 · 13 revisions

Welcome to the Aqua-Resizer wiki!

If you have issues, questions and feedbacks, please use the Issues page of this git. :)

Usage

<?php aq_resize( $url, $width, $height, $crop, $single ) ?>

Parameters

$url

(str)(required) - The image URL you want to resize/crop. Note: Must be uploaded through WordPress. Default: none

$width

(integer)(required) - The width to be resized into in pixels. Default: none

$height

(integer)(optional) - The height to be resized into in pixels. Default: null

$crop

(boolean)(optional) - Crop the image or not. False - Soft proportional crop mode ; True - Hard crop mode.. Default: false

$single

(boolean)(optional) True - Return an array containing url, width, and height. False - return url. Default: false

Return

Return image URL if single is set to true or not set.

Otherwise return array() containing

  • [0] => url
  • [1] => width
  • [2] => height

Examples

I have included several usage samples on this page. More will be included soon

Future plans

  • Ability to choose "quality" of the resized images (jpeg only)
  • Define custom cache path (currently uses default WP upload directory)
  • Custom suffix
Clone this wiki locally