mirror of
https://github.com/getgrav/grav.git
synced 2026-02-11 00:57:51 +01:00
Merge branch 'develop' of https://github.com/getgrav/grav into develop
This commit is contained in:
@@ -21,6 +21,7 @@ form:
|
||||
frontmatter:
|
||||
type: frontmatter
|
||||
label: PLUGIN_ADMIN.FRONTMATTER
|
||||
autofocus: true
|
||||
|
||||
content:
|
||||
type: markdown
|
||||
|
||||
@@ -88,7 +88,7 @@ class Media extends Getters
|
||||
|
||||
$altMedium = $altMedium['file'];
|
||||
|
||||
$medium = MediumFactory::scaledFromMedium($altMedium, $ratio, 1);
|
||||
$medium = MediumFactory::scaledFromMedium($altMedium, $ratio, 1)['file'];
|
||||
}
|
||||
|
||||
if (!$medium) {
|
||||
@@ -116,7 +116,7 @@ class Media extends Getters
|
||||
continue;
|
||||
}
|
||||
|
||||
$types['alternative'][$i] = MediumFactory::scaledFromMedium($alternatives[$max], $max, $i);
|
||||
$types['alternative'][$i] = MediumFactory::scaledFromMedium($alternatives[$max]['file'], $max, $i);
|
||||
}
|
||||
|
||||
foreach ($types['alternative'] as $ratio => $altMedium) {
|
||||
|
||||
@@ -140,6 +140,6 @@ class MediumFactory
|
||||
$medium = self::fromFile($file);
|
||||
$medium->set('size', $size);
|
||||
|
||||
return $medium;
|
||||
return ['file' => $medium, 'size' => $size];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user