承接 kollarovic/thumbnail 相关项目开发

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

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

kollarovic/thumbnail

最新稳定版本:4.0.0

Composer 安装命令:

composer require kollarovic/thumbnail

包简介

Generating image thumbnails

README 文档

README

{var $image='images/image.jpg'}

<img src="{$image|thumbnail: 150, 150}" />

Installation

composer.json

composer require kollarovic/thumbnail

config.neon

extensions:
	thumbnail: Kollarovic\Thumbnail\DI\Extension

Configuration

config.neon

thumbnail:
	thumbPathMask: 'images/thumbs/{filename}-{width}x{height}.{extension}'
	placeholder: 'http://dummyimage.com/{width}x{height}/efefef/f00&text=Image+not+found'
    

MD5 thumbnail saving

{md5} param in thumbPathMask takes file path and file name, converts it to md5 hash and then saves it in nested directories to avoid having millions of files in one folder. For example let's say md5 hash of my src location somedir/project/www/images/users/1/profile.jpg is e728fdeab7e2edda33f36fbf7a2b7c82 so using this thumbPathMask:

thumbPathMask: 'images/thumbs/{md5}/{width}x{height}-{crop}.{extension}'

it gets stored in images/thumbs/e/7/2/e728fdeab7e2edda33f36fbf7a2b7c82/{width}x{height}-{crop}.jpg

统计信息

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

GitHub 信息

  • Stars: 10
  • Watchers: 3
  • Forks: 16
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-06-22