mirror of
https://github.com/getgrav/grav.git
synced 2026-02-22 06:28:03 +01:00
Merge pull request #407 from hwmaier/feature/enable-progressive-bug
Clear previously applied operations when doing a reset on image files to avoid calling filters twice
This commit is contained in:
@@ -9,6 +9,14 @@ class ImageFile extends \Gregwar\Image\Image
|
||||
{
|
||||
use GravTrait;
|
||||
|
||||
/**
|
||||
* Clear previously applied operations
|
||||
*/
|
||||
public function clearOperations()
|
||||
{
|
||||
$this->operations = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the same as the Gregwar Image class except this one fires a Grav Event on creation of new cached file
|
||||
*
|
||||
|
||||
@@ -260,6 +260,7 @@ class ImageMedium extends Medium
|
||||
|
||||
if ($this->image) {
|
||||
$this->image();
|
||||
$this->image->clearOperations(); // Clear previously applied operations
|
||||
$this->filter();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user