mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Fixed error on thumbnail image creation
This commit is contained in:
parent
b9db2f3322
commit
7666651324
|
|
@ -7,6 +7,8 @@
|
|||
2. [](#improved)
|
||||
* Improved `Filesystem::basename()` and `Filesystem::pathinfo()` to be unicode-safe
|
||||
* Made path handling unicode-safe, use new `Utils::basename()` and `Utils::pathinfo()` everywhere
|
||||
3. [](#bugfix)
|
||||
* Fixed error on thumbnail image creation
|
||||
* Fixed MimeType for `gzip` (`application/x-gzip`)
|
||||
|
||||
# v1.7.28
|
||||
|
|
|
|||
|
|
@ -574,11 +574,12 @@ trait MediaObjectTrait
|
|||
|
||||
foreach ($types as $type) {
|
||||
$thumb = $this->get("thumbnails.{$type}", false);
|
||||
|
||||
if ($thumb) {
|
||||
$thumb = $thumb instanceof ThumbnailImageMedium ? $thumb : $this->createThumbnail($thumb);
|
||||
$thumb->parent = $this;
|
||||
$this->_thumbnail = $thumb;
|
||||
$image = $thumb instanceof ThumbnailImageMedium ? $thumb : $this->createThumbnail($thumb);
|
||||
if($image) {
|
||||
$image->parent = $this;
|
||||
$this->_thumbnail = $image;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ class Medium extends Data implements RenderableInterface, MediaFileInterface
|
|||
|
||||
/**
|
||||
* @param string $thumb
|
||||
* @return Medium|null
|
||||
*/
|
||||
protected function createThumbnail($thumb)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user