mirror of
https://github.com/getgrav/grav.git
synced 2026-01-29 19:00:12 +01:00
Moved default image quality to defines.php
This commit is contained in:
@@ -40,3 +40,6 @@ define('RAW_CONTENT', 1);
|
||||
define('TWIG_CONTENT', 2);
|
||||
define('TWIG_CONTENT_LIST', 3);
|
||||
define('TWIG_TEMPLATES', 4);
|
||||
|
||||
// Other defines
|
||||
define('DEFAULT_IMG_QUALITY', 85);
|
||||
|
||||
@@ -48,7 +48,7 @@ class Medium extends Data
|
||||
protected $image;
|
||||
|
||||
protected $type = 'guess';
|
||||
protected $quality = 85;
|
||||
protected $quality = DEFAULT_IMG_QUALITY;
|
||||
protected $debug_watermarked = false;
|
||||
|
||||
public static $valid_actions = [
|
||||
@@ -206,7 +206,7 @@ class Medium extends Data
|
||||
* @param bool $reset
|
||||
* @return string
|
||||
*/
|
||||
public function img($title = null, $class = null, $type = null, $quality = 80, $reset = true)
|
||||
public function img($title = null, $class = null, $type = null, $quality = DEFAULT_IMG_QUALITY, $reset = true)
|
||||
{
|
||||
if (!$this->image) {
|
||||
$this->image();
|
||||
@@ -299,7 +299,7 @@ class Medium extends Data
|
||||
* @param int $quality
|
||||
* @return $this
|
||||
*/
|
||||
public function format($type = null, $quality = 80)
|
||||
public function format($type = null, $quality = DEFAULT_IMG_QUALITY)
|
||||
{
|
||||
if (!$this->image) {
|
||||
$this->image();
|
||||
@@ -366,7 +366,7 @@ class Medium extends Data
|
||||
$this->filter();
|
||||
}
|
||||
$this->type = 'guess';
|
||||
$this->quality = 80;
|
||||
$this->quality = DEFAULT_IMG_QUALITY;
|
||||
$this->debug_watermarked = false;
|
||||
|
||||
return $this;
|
||||
|
||||
Reference in New Issue
Block a user