GC_Image_Editor::get_default_quality()

最后更新于:2021-11-27 23:34:43

GC_Image_Editor::get_default_quality( string$mime_type)

响应s the default compression quality setting for the mime type.

参数

$mime_type

(string) (Required)

响应

(int) The default quality setting for the mime type.

源文件

文件: gc-includes/class-gc-image-editor.php

	protected function get_default_quality( $mime_type ) {
		switch ( $mime_type ) {
			case 'image/webp':
				$quality = 86;
				break;
			case 'image/jpeg':
			default:
				$quality = $this->default_quality;
		}

		return $quality;
	}