Skip to content

Commit

Permalink
Fixed cannot change image format [#3173]
Browse files Browse the repository at this point in the history
  • Loading branch information
mahagr committed Jan 25, 2021
1 parent fcf24a4 commit a4481bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
1. [](#bugfix)
* Fixed `bin/gpm uninstall` script not working because of bad typehint [#3172](https://github.com/getgrav/grav/issues/3172)
* Fixed `login: visibility_requires_access` not working [#3176](https://github.com/getgrav/grav/issues/3176)
* Fixed cannot change image format [#3173](https://github.com/getgrav/grav/issues/3173)

# v1.7.3
## 01/21/2021
Expand Down
6 changes: 4 additions & 2 deletions system/src/Grav/Common/Media/Traits/ImageMediaTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,10 @@ protected function saveImage()
return $this->result;
}

$extension = strtolower($this->get('extension'));
$this->format($extension);
if ($this->format === 'guess') {
$extension = strtolower($this->get('extension'));
$this->format($extension);
}

if (!$this->debug_watermarked && $this->get('debug')) {
$ratio = $this->get('ratio');
Expand Down

0 comments on commit a4481bf

Please sign in to comment.