public static function should_convert_to_jpg( $img_size, $file_src ) {
		if ( isset( $img_size['tojpg'] )
			&& $img_size['tojpg']
			&& 'application/pdf' !== wp_check_filetype( $file_src )['type']
		) {
			return true;
		}

		return false;
	}
public static function should_convert_to_jpg( $img_size, $file_src ) {
		if ( isset( $img_size['tojpg'] )
			&& $img_size['tojpg']
			&& 'application/pdf' !== wp_check_filetype( $file_src )['type']
		) {
			return true;
		}

		return false;
	}
public static function should_convert_to_jpg ( $ img_size , $ file_src ) { if ( isset ( $ img_size [ 'tojpg' ] ) && $ img_size [ 'tojpg' ] && 'application/pdf' !== wp_check_filetype ( $ file_src ) [ 'type' ] ) { return true ; } return false ; }
Check if an image should be converted to JPG.

Checks for the existence of the `tojpg` parameter and whether the image is a PDF. Trying to
convert PDF images will lead to an error, which we need to catch here.

@since 0.13.2

@param array  $img_size Configuration values for an image size.
@param string $file_src The src of the original image.

@return bool Whether the image should be converted.
Check if an image should be converted to JPG .