endroid/image-placeholder-bundle 问题修复 & 功能扩展

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

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

endroid/image-placeholder-bundle

最新稳定版本:2.0.4

Composer 安装命令:

composer require endroid/image-placeholder-bundle

包简介

Endroid Image Placeholder

README 文档

README

By endroid

Latest Stable Version Build Status Total Downloads Monthly Downloads License

Provides a Twig filter that replaces empty or invalid URLs with a placeholder image from any of the registered image providers.

Installation

Use Composer to install the library.

$ composer require endroid/image-placeholder

Configuration

The default placeholder generation parameters can be overridden via the constructor arguments or service definition. All parameters are optional.

Usage

Placeholders are placed via a Twig filter that shows the placeholder image in case the service is activated and the given URL is empty or invalid.

<img src="{{ image_url|image_placeholder(200, 300) }}" />
<img src="{{ image_url|image_placeholder(200, 300, { provider: 'placehoff' }) }}" />

Providers

Currently the following providers are supported.

Versioning

Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatibility breaking changes will be kept to a minimum but be aware that these can occur. Lock your dependencies for production and test your code when upgrading.

License

This library is under the MIT license. For the full copyright and license information please view the LICENSE file that was distributed with this source code.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-17