Modif small by thumb
This commit is contained in:
parent
e94ccf41d3
commit
a34031f914
|
@ -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();
|
||||
});
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue