定制 malven/craft-imgix 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

malven/craft-imgix

Composer 安装命令:

composer require malven/craft-imgix

包简介

Tools for working with the Imgix image-generation service in Craft

README 文档

README

Tools for working with the Imgix image-generation service in Craft

Requirements

This plugin requires Craft CMS 3.0.0-beta.23 or later.

Installation

To install the plugin, follow these instructions.

  1. Open your terminal and go to your Craft project:

     cd /path/to/project
    
  2. Then tell Composer to load the plugin:

     composer require malven/craft-imgix
    
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Imgix.

Use

Configuration:

Imgix expects the following settings to be configured:

  • Imgix API Key: Your Imgix API key, obtained from the Imgix control panel.
  • Imgix Source Name: The name of your source defined in the Imgix control panel.
  • Secure URL Token: If you have Secure URL enabled for your Imgix source, this should be the Secure URL Token value listed there.

Generating Image URLs in Twig:

{% set url = craft.imgix.url(myAssetField.first, {
    w: 1000,
    h: 800,
    q: 50,
    auto: 'format',
    fit: 'max'
}) %}

Any options supported by the Imgix image API can be passed into these options. Imgix will do the work of transforming the original asset URL into the appropriate Imgix URL based on your plugin settings.

Clearing Imgix Caches:

Whenever an asset in Craft is replaced or deleted, Imgix will attempt to automatically clear the corresponding Imgix cache for that asset.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-01-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固