我想在我的博文中使用缩略图。在后模型中我需要写这个:
use TCG\Voyager\Traits\Resizable;
class Post extends Model
{
use Resizable;
}
然后还有另一个设置部分:
{
"resize": {
"width": "1000",
"height": null
},
"quality" : "70%",
"upsize" : true,
"thumbnails": [
{
"name": "medium",
"scale": "50%"
},
{
"name": "small",
"scale": "25%"
},
{
"name": "cropped",
"crop": {
"width": "300",
"height": "250"
}
}
]
}
设置部分在哪里?
并且,之后如何生成缩略图?
来源:
https://voyager.readme.io/docs/thumbnails-url
https://voyager.readme.io/docs/additional-field-options#section-image