wp_crop_image Wordpress function


Crop an Image to a given size.



(string|int) $src The source file or Attachment ID.
(int) $src_x The start x position to crop from.
(int) $src_y The start y position to crop from.
(int) $src_w The width to crop.
(int) $src_h The height to crop.
(int) $dst_w The destination width.
(int) $dst_h The destination height.
(int) $src_abs Optional. If the source crop points are absolute.
(string) $dst_file Optional. The destination file to write to.

Return Type:

(string|WP_Error) New filepath on success, WP_Error on failure.

Define At:


Wordpress Reference URL:


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