image_resize Wordpress function


Description:

Scale down an image to fit a particular size and save a new copy of the image.


Syntax:


Arguments:

(string) $file Image file path.
(int) $max_w Maximum width to resize to.
(int) $max_h Maximum height to resize to.
(bool) $crop Optional. Whether to crop image or resize.
(string) $suffix Optional. File suffix.
(string) $dest_path Optional. New image file path.
(int) $jpeg_quality Optional, default is 90. Image quality percentage.


Return Type:

(mixed) WP_Error on failure. String with new destination path.


Define At:

wp-includes/deprecated.php


Wordpress Reference URL:

http://codex.wordpress.org/Function_Reference/image_resize


0 Flares Facebook 0 Google+ 0 0 Flares ×
Posted in: Wordpress functions
0 Flares Facebook 0 Pin It Share 0 Google+ 0 0 Flares ×