unionco/craft-cloudconvert

Craft CMS 的 CloudConvert 缩略图 API 集成

0.1.0.3 2022-10-31 14:08 UTC

This package is auto-updated.

Last update: 2024-09-29 06:14:57 UTC


README

通过 CloudConvert 为 Craft CMS 3 & 4 集成缩略图

此插件仍在开发中,不应在生产环境中使用

版本和兼容性

  • 1.x.x -> Craft CMS 3
  • 2.x.x -> Craft CMS 4

安装

待定

将配置文件复制到您的项目中:cp vendor/unionco/craft-cloudconvert/config.php config/cloudconvert.php并根据需要自定义。

每个配置选项在 vendor/unionco/craft-cloudconvert/src/models/Settings.php 中都有文档说明,以下是一个简要概述(配置)

配置

  • apiKey - (string) CloudConvert API 密钥。您必须创建自己的 CloudConvert 账户并生成自己的 API 密钥。
  • thumbnailFolderUid - (string) 卷文件夹 UID,由 Craft 的项目配置生成。您可以通过数据库表 {{%volumefolders}} 查找此值。
  • sandbox - (bool) CloudConvert 应该以沙盒模式运行吗?
  • enabled - (bool) 应在此环境中启用此插件吗?
  • thumbnailWidth - (int) 默认为 300
  • thumbnailHeight - (int) 默认为 300
  • thumbnailFit - (string) 例如 'crop'

用法

  • 此插件提供了一个从 Craft 资产元素生成缩略图的接口。如何将其与您的 CMS 和业务逻辑连接取决于您。
  • 除非您明确配置,否则此插件不会自动执行任何操作

API

CloudConvert 服务(进行中)