am-impact / amtools
关于此包最新版本(1.4.2)的许可信息不可用。
通用工艺工具
1.4.2
2017-03-20 15:07 UTC
Requires
- composer/installers: ~1.0
This package is not auto-updated.
Last update: 2024-09-20 22:07:51 UTC
README
v1.4.0
缓存破坏
示例
<link rel="stylesheet" href="{{ gruntCacheBust('grunt-cache-bust.json', 'resources/css/all.css') }}">
<script src="{{ gruntCacheBust('grunt-cache-bust.json', 'resources/scripts/all.min.js') }}"></script>
Imageoptim
使用Imagick将上传的图像分辨率设置为72ppi
v1.3.0
图像过滤器
可能效果:
- 模糊
- 着色
- 灰度(黑白)
- 负片
- 锐化
示例:
<img src="{{ craft.amTools.getImageUrl(entry.image.first(), { filters: 'gray', width: 150, height: 150 }) }}" alt="">
<img src="{{ entry.image.first()|image_url({ filters: 'gray', width: 150, height: 150, mode: 'fit' }) }}" alt="">
<img src="{{ entry.image.first()|image_url({ filters: { effect: 'colorize', color: '#FF00D0' }, width: 150, height: 150 }) }}" alt="">
<img src="{{ entry.image.first()|image_url({ filters: ['gray', 'sharpen'], width: 150, height: 150 }) }}" alt="">
<img src="{{ entry.image.first()|image_url({ filters: ['negative', 'blur', { effect: 'colorize', color: '#FF00D0' }], width: 150, height: 150 }) }}" alt="">