If the original image width or height is above the threshold, it will be scaled down. The threshold is used as max width and max height. The scaled down image will be used as the largest available size, including the _wp_attached_file post meta value. Returning false from the filter callback will disable the scaling.
Parameters
$thresholdint
The threshold value in pixels. Default 2560.
$imagesizearray
{ Indexed array of the image width and height in pixels. @type int $0 The image width. @type int $1 The image height.}
282* @type int$0 The image width.283* @type int$1 The image height.284*}285* @param string$file Full path to the uploaded image file.286* @param int$attachment_id Attachment post ID.287*/288$threshold=(int)apply_filters('big_image_size_threshold',2560,$imagesize,$file,$attachment_id);289290/*291 * If the original image's dimensions are over the threshold,292 * scale the image and use it as the "full" size.293 */294$scale_down=false;
History
Introduced in 5.3.0. Unchanged from 6.7.7 through 7.1.0.