【问题标题】:Setting "Additional Field Options" for thumbnails in Voyager在 Voyager 中为缩略图设置“附加字段选项”
【发布时间】:2021-07-21 20:09:05
【问题描述】:

我想在我的博客文章中使用缩略图。在 Post-model 中我需要这样写:

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

【问题讨论】:

    标签: laravel voyager


    【解决方案1】:

    设置应该写在图像表单字段前面的表格的面包页中。

    【讨论】:

    • 感谢您的回答!不幸的是,这是很久以前的事了,老实说,我什至不知道我当时试图解决什么问题,以及它是否已经解决了。我为你的努力投了赞成票。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-22
    • 1970-01-01
    • 1970-01-01
    • 2017-04-07
    • 2012-09-23
    • 2012-02-15
    相关资源
    最近更新 更多