承接 spacecatninja/imager-x-gcs-storage-driver 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

spacecatninja/imager-x-gcs-storage-driver

最新稳定版本:1.0.0

Composer 安装命令:

composer require spacecatninja/imager-x-gcs-storage-driver

包简介

External storage driver for Imager X that integrates with Google Cloud Services

README 文档

README

External storage driver for Imager X that uploads transformed images to Google Cloud Storage.

Requirements

  • Craft CMS 5.0.0 or later
  • Imager X 6.0.0 or later (Pro edition)

Installation

composer require spacecatninja/imager-x-gcs-storage-driver
php craft plugin/install imager-x-gcs-storage-driver

Configuration

Add a gcs key to storageConfig in your config/imager-x.php:

'storages' => ['gcs'],

'storageConfig' => [
    'gcs' => [
        'keyFile' => '',
        'bucket' => 'my-bucket',
        'folder' => 'transforms',
    ],
],

Point imagerUrl at your bucket:

'imagerUrl' => 'https://storage.googleapis.com/my-bucket/transforms/',

Always flush your Imager transforms cache when adding or removing external storages, as existing cached transforms will not be re-uploaded.

Configuration options

Option Default Description
keyFile '' Service account credentials as a JSON string, a path to a JSON key file, or an environment variable reference (e.g. $GCS_KEY).
bucket '' GCS bucket name.
folder '' Folder prefix within the bucket.

Authentication

The keyFile setting accepts two formats:

JSON string — pass the service account JSON directly (or via an environment variable):

'keyFile' => '$GOOGLE_APPLICATION_CREDENTIALS_JSON',

File path — pass the path to a service account key file:

'keyFile' => '/var/secrets/gcs-key.json',

Uploaded objects are set to publicRead ACL. Make sure your bucket is configured to allow public access if you intend to serve transforms directly from GCS.

Price, license and support

The plugin is released under the MIT license. It requires Imager X Pro, which is a commercial plugin available in the Craft plugin store.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-06