vitamin2/v2-image-factory 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

vitamin2/v2-image-factory

最新稳定版本:0.2.1

Composer 安装命令:

composer require vitamin2/v2-image-factory

包简介

V2 Image Factory

README 文档

README

Just an image factory

Installation

Download

Download and copy this repository to /site/plugins/v2-image-factory.

Composer

composer require vitamin2/v2-image-factory

Setup

  1. Install plugin

  2. Add Image Factory JS to your template (getFactoryJS returns a versionised JS file)

  <?= js([
    getFactoryJs(),
  ]) ?>
  1. Preload it (optional)
  <link rel="preload" href="<?= getFactoryJs() ?>" as="script" />

Usage

  1. imageURL choose image

  2. imageType choose crop type

    • variousHeights (choose this if you have differnt image heights, e.g for base image or logos)
    • cropToRatio (choose this if you have a fixed ratio e.g. for gallery, headers)
    • cropToRatioMultiple (choose this if you have 2 ratios, mobile and desktop)
  3. imageRatio (for cropToRatio and cropToRatioMultiple) choose image ratio (e.g. 16/9 = 1.777 or 4/3 = 1.333)

  4. imageRatioDesktop (for cropToRatioMultiple) choose image ratio for Desktop

  5. imageCustomClass add a custom class here

  6. imageCropToPoint (for cropToRatio, cropToRatioMultiple) select crop point

    • default is center, but you can also set left, top, etc.
  snippet('global/image-factory', [
    'imageURL' => $data->gallery()->toFile(),
    'imageType' => 'variousHeights',
    'imageRatio' => '1.333',
    'imageRatioDesktop' => '3',
    'imageCustomClass' => '',
    'imageCropToPoint' => 'center'
  ])

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固