定制 littlegiant/silverstripe-cms-image-dimensions 二次开发

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

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

littlegiant/silverstripe-cms-image-dimensions

最新稳定版本:3.2.1

Composer 安装命令:

composer require littlegiant/silverstripe-cms-image-dimensions

包简介

README 文档

README

Easily add image dimensions to image fields and enforce maximum sizes for uploads to those fields through configuration.

Provides a single source of image dimensions for the user in the CMS

CMS Image Dimensions CMS Image Dimensions on object

Installation

Installation via composer

$ composer require littlegiant/silverstripe-cms-image-dimensions

Usage

Set definitions in a yml config and add that configuration to the images which you want it to apply to

LittleGiant\CmsImageDimensions\ImageDimensionsProvider:
  max_size: 512K
  definitions:
    blog-post-featured-image:
      name: Blog Post Featured Image
      description: Featured image on your blog post.
      min_width: 1024
      min_height: 768
      validate_dimensions: true
      aspect_ratio: 4:3
      validate_aspect_ratio: true
      max_size: 1M # override default of 512KB to allow larger images

SilverStripe\Blog\Model\BlogPost:
  image_dimensions:
    FeaturedImage: blog-post-featured-image

Contributing

Code guidelines

This project follows the standards defined in:

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2019-04-09