Modif small by thumb
This commit is contained in:
@@ -4,6 +4,7 @@ return [
|
||||
'route' => 'images',
|
||||
'path' => storage_path('images'),
|
||||
'templates' => array(
|
||||
'thumb' => \Meoran\Images\Templates\Thumb::class,
|
||||
'small' => \Meoran\Images\Templates\Small::class,
|
||||
'medium' => \Meoran\Images\Templates\Medium::class,
|
||||
'large' => \Meoran\Images\Templates\Large::class,
|
||||
|
@@ -10,7 +10,7 @@ class Medium implements FilterInterface
|
||||
{
|
||||
public function applyFilter(Image $image)
|
||||
{
|
||||
return $image->resize(240, null, function (Constraint $constraint) {
|
||||
return $image->resize(960, null, function (Constraint $constraint) {
|
||||
$constraint->upsize();
|
||||
$constraint->aspectRatio();
|
||||
});
|
||||
|
@@ -10,7 +10,7 @@ class Small implements FilterInterface
|
||||
{
|
||||
public function applyFilter(Image $image)
|
||||
{
|
||||
return $image->resize(120, null, function (Constraint $constraint) {
|
||||
return $image->resize(480, null, function (Constraint $constraint) {
|
||||
$constraint->upsize();
|
||||
$constraint->aspectRatio();
|
||||
});
|
||||
|
18
src/Templates/Thumb.php
Executable file
18
src/Templates/Thumb.php
Executable file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Meoran\Images\Templates;
|
||||
|
||||
use Intervention\Image\Constraint;
|
||||
use Intervention\Image\Filters\FilterInterface;
|
||||
use Intervention\Image\Image;
|
||||
|
||||
class Thumb implements FilterInterface
|
||||
{
|
||||
public function applyFilter(Image $image)
|
||||
{
|
||||
return $image->resize(120, null, function (Constraint $constraint) {
|
||||
$constraint->upsize();
|
||||
$constraint->aspectRatio();
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user