Glossary Term
image_resize_dimensions()
image_resize_dimensions() — Retrieves calculated resize dimensions for use in WP_Image_Editor. Calculates dimensions and coordinates for a resized image that fits within a specified width and height.
Inputs: $orig_w (int): Original width in pixels. $orig_h (int): Original height in pixels. $dest_w (int): New width in pixels. $dest_h (int): New height in pixels. $crop (bool|array): Optional. Image cropping behavior. If false, the image will be scaled (default). If true, image will be cropped to the specified dimensions using center positions. If an array, the image will be cropped using the array to specify the crop location: Field $0 (string): The x crop position. Accepts ‘left’, ‘center’, or ‘right’. Field $1 (string): The y crop position. Accepts ‘top’, ‘center’, or ‘bottom’.
Returns array|false: Returned array matches parameters for imagecopyresampled(). False on failure.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
