https://github.com/appleple/acms-tiny-png
https://github.com/appleple/acms-tiny-png
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/appleple/acms-tiny-png
- Owner: appleple
- License: mit
- Created: 2019-11-21T05:45:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-29T02:37:45.000Z (about 4 years ago)
- Last Synced: 2025-01-09T11:55:41.604Z (over 1 year ago)
- Language: PHP
- Size: 227 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TinyPNG for a-blog cms
## ダウンロード
[https://github.com/appleple/acms-tiny-png/raw/master/build/TinyPNG.zip](https://github.com/appleple/acms-tiny-png/raw/master/build/TinyPNG.zip)
## 実現できること
TinyPNGのAPIを利用して、画像のロスレス圧縮を実現できます。Hook機能を使って画像生成時に、すべてロスレス圧縮します。
また校正オプションを用意していて、ロスレス圧縮された状態で画像のリサイズをすることができます。
## 設定方法
[https://tinypng.com/](https://tinypng.com/) でアカウントを作成し、**API Key** を発行ください。発行した API Key を **private/config.system.yaml** に追記します。
```
tiny_png_api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxx
```
## 校正オプション
```
resizeTinyPng(type, width, height)
```
### type の種類
- scale
- fit
- cover
- thumb
```html
```