mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 08:45:28 +02:00
Fixed params getting lost in MediumFactory
This commit is contained in:
@@ -79,7 +79,7 @@ abstract class LocalMedia extends AbstractMedia
|
||||
$relativePath = Folder::getRelativePath($filename, $this->getPath());
|
||||
$info = $this->index[$relativePath] ?? null;
|
||||
if (null === $info && file_exists($filename)) {
|
||||
return MediumFactory::fromFile($filename);
|
||||
return MediumFactory::fromFile($filename, $params);
|
||||
}
|
||||
|
||||
$filename = $relativePath;
|
||||
|
||||
@@ -133,7 +133,7 @@ class Medium extends Data implements RenderableInterface, MediaFileInterface
|
||||
* @param string $thumb
|
||||
* @return MediaObjectInterface|null
|
||||
*/
|
||||
protected function createThumbnail($thumb)
|
||||
protected function createThumbnail($thumb): ?MediaObjectInterface
|
||||
{
|
||||
return $this->getMedia()->createFromFile($thumb, ['type' => 'thumbnail']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user