glue-agency/craft-glue-cdn-imager-x

Imager X 的 Glue Agency 图像 CDN

5.0.0 2024-05-21 13:36 UTC

This package is auto-updated.

Last update: 2024-09-21 14:23:54 UTC


README

Imager X 的 Glue Agency 图像 CDN

需求

此插件需要 Craft CMS 4.3.5 或更高版本,以及 PHP 8.0.2 或更高版本。

安装

您可以从插件商店或使用 Composer 安装此插件。

使用 Composer

打开您的终端并运行以下命令

# go to the project directory
cd /path/to/my-project.test

# tell Composer to load the plugin
composer require glue-agency/craft-glue-cdn-imager-x

# tell Craft to install the plugin
php craft plugin/install glue-cdn-imager-x

配置

/config 中创建 glue-cdn-imager-x.php 文件并添加以下内容。

return [
    'baseUrl'       => rtrim(getenv('GLUE_CDN_DOMAIN'), '/'),
    'signKey'       => getenv('GLUE_CDN_SIGN_KEY'),
    'defaultParams' => [
        'dpr' => 2,
    ],
];

将 Imager-X 转换器更新为 glue-cdn