WP_Image_Editor::get_default_quality( string $mime_type )

Returns the default compression quality setting for the mime type.


Parameters

$mime_type

(Required)


Return

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


Source

File: wp-includes/class-wp-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;
	}

Changelog

Changelog
Version Description
5.8.1 Introduced.