poznet/imageoptimbundle 问题修复 & 功能扩展

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

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

poznet/imageoptimbundle

Composer 安装命令:

composer require poznet/imageoptimbundle

包简介

Symfony Bundle - Wrapper for tinyjpg

README 文档

README

Bundle for Symfony 2/3

Main idea is to use tinify API to shrink images, that are already stored in server. Shrinking when uploading images takes too much time, so it's better to do that with commands firedup in cron

SensioLabsInsight

Usage

Bundle adds new commands (for use with cron for example):

console image:optim:scan - searches for images in given dirs

console image:optim:minify - minify images (default is 20 images per 1 run - can be overwriten by argument)

console image:optim:stats - writes statistics info

console image:optim:truncate - removes all images data from database

Installation

Install with composer

composer require poznet/imageoptimbundle

create databes structures

console d:s:u --force

Add API key in parameters.yml

tinifyAPI: key

Define paths in parameters.yml All paths should be realive to main all dir (1 above app).

This parameters are used in Finder() Component as in() and exclude()

imageoptim_dirs:
  - web/media
  - web/media2
imageoptim_excluded:
  - cache

Other

Bundle uses custom events , so it can be easily extended

Events :

  • image.add
  • image.minify

Both takes Poznet\ImageOptimBundle\Event\ImageEvent class as event.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2017-10-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固