1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-12 01:25:01 +02:00

Issue #4270 - perform all webp conversion checks within e_thumbnail class. WebP conversion now works with SEF media URLS.

This commit is contained in:
Cameron
2021-06-18 09:31:45 -07:00
parent 7302803a75
commit c4f76c3687
4 changed files with 6 additions and 41 deletions

View File

@@ -250,7 +250,6 @@ class e_parse
private $bootstrap;
private $fontawesome;
private $convertToWebP = false;
private $removedList = array();
private $nodesToDelete = array();
@@ -2361,11 +2360,6 @@ class e_parse
parse_str($options, $options);
}
if($this->convertToWebP)
{
$options['type'] = 'webp';
}
if(!empty($options['scale'])) // eg. scale the width height 2x 3x 4x. etc.
{
$options['return'] = 'src';
@@ -2442,9 +2436,9 @@ class e_parse
}
if(!empty($options['type']) && ($options['type'] === 'webp'))
if(!empty($options['type']))
{
$thurl .= '&type=webp';
$thurl .= '&type='.$options['type'];
}
@@ -3592,15 +3586,6 @@ class e_parse
$this->bootstrap = (int) $version;
}
/**
* @param bool $bool
*/
public function setConvertToWebP($bool)
{
$this->convertToWebP = (bool) $bool;
}
/**
* Add leading zeros to a number. eg. 3 might become 000003