0
我正在使用干预imagecache。但是,它在我的本地开发环境中按照需要运行,但不适用于生产环境。我已创建自定义模板:干预imagecache是生产服务器上的越野车L5.2
class NewsFilter implements FilterInterface
{
public function applyFilter(Image $image)
{
return $image->fit(135, 135);
}
}
把它添加到
'templates' => array(
'small' => 'Intervention\Image\Templates\Small',
'medium' => 'Intervention\Image\Templates\Medium',
'large' => 'Intervention\Image\Templates\Large',
'news' => 'App\Filters\NewsFilter',
),
做composer dumpautoload -o
/artisan route:clear
/artisan cache:clear
/artisan view:clear
没有什么帮助。在当地它显示了正确的尺寸135x135px,但生产它的50×50
您可以点击此处查看:http://sportus.cash/news
所有图像为50x50,但他们应该是135x135