-
Notifications
You must be signed in to change notification settings - Fork 205
Home
Welcome to the Aqua-Resizer wiki!
If you have issues, questions and feedbacks, please use the Issues page of this git. :)
<?php aq_resize( $url, $width, $height, $crop, $single ) ?>
(str)(required) - The image URL you want to resize/crop. Note: Must be uploaded through WordPress. Default: none
(integer)(required) - The width to be resized into in pixels. Default: none
(integer)(optional) - The height to be resized into in pixels. Default: null
(boolean)(optional) - Crop the image or not. False - Soft proportional crop mode ; True - Hard crop mode.. Default: false
(boolean)(optional) True - Return an array containing url, width, and height. False - return url. Default: false
The function will return a string containing the URL of the cropped image by default, or return an array containing the cropped image url and it's new calculated width & height. The function will only run once for each image & set dimensions. Once the image is already cropped, it will only return the URL therefore you won't have to worry about the function hogging your server on each page load.
I have included several usage samples on this page. More will be included soon
- Ability to choose "quality" of the resized images (jpeg only)
- Define custom cache path (currently uses default WP upload directory)
- Custom suffix