Jetpack_Custom_CSS_Enhancements::editor_max_image_size PHP Method

editor_max_image_size() static public method

When on the edit screen, make sure the custom content width setting is applied to the large image size.
static public editor_max_image_size ( array $dims, string $size = 'medium', null $context = null ) : array
$dims array Array of image dimensions (width and height).
$size string Size of the resulting image.
$context null Context the image is being resized for. `edit` or `display`.
return array
    static function editor_max_image_size($dims, $size = 'medium', $context = null)
    {
        list($width, $height) = $dims;
        if ('large' === $size && 'edit' === $context) {
            $width = Jetpack::get_content_width();
        }
        return array($width, $height);
    }