定制 simexis/thumbalizr 二次开发

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

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

simexis/thumbalizr

最新稳定版本:1.1

Composer 安装命令:

composer require simexis/thumbalizr

包简介

README 文档

README

Thumbalizr Class for Laravel 5

Uses API from thumbalizr.com

Requirements

  • Laravel 5.X
  • php 5.4+

Installation

Step 1: Install package using Composer

Add simexis/thumbalizr to "require" section of your composer.json

"require": {
    "simexis/thumbalizr": ">=1.0"
},

Add repository to "repositories" section of your composer.json

"repositories": [ {
	"type": "vcs",
	"url": "https://github.com/jooorooo/Thumbalizr.git"
}],

Then install dependencies using following command:

php composer.phar install
Step 2: Laravel Setup

Add following line to 'providers' section of app/config/app.php file:

'Simexis\Thumbalizr\ThumbalizrServiceProvider',

Usage

Default configuration is:

$cfg = [
	'api_key'			=>	"", //put your api key here
	'service_url'		=>	"http://api.thumbalizr.com/", // don't change, if you didn't have a special service contract
	'use_local_cache'	=>	TRUE, // TRUE or FALSE for local image cache
	'local_cache_dir'	=>	public_path()."/thumbs", //relative cache directory must exists in install directory and rwx permissions to all (777)
	'local_cache_expire'=>	24*14, // local chache expiration time in hours

	'defaults' 			=> [
        'width'				=>		"400", // image width
		'delay'				=>		"10", // caputre delay useful for flash content 5 - 10 is a good value
		'encoding'			=>		"png", // jpg or png
		'quality'			=>		"90", //image quality 10-90
		'bwidth'			=>		"1280", // browser width
		'mode'				=>		"screen", // screen or page
		'bheight'			=>		"1024" // browser height only for mode=screen
   	]
];

Basic example

$cfg = [
	'api_key'			=>	"..............", 

	'defaults' 			=> [
        'width'				=>		"250", // image width
   	]
];
echo \Thumbalizr::getThumbSrc('http://google.com',$cfg);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-06-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固