imagelint / imagelint-php
一个将您的图片URL转换为Imagelint URL的类
dev-master
2017-03-24 11:47 UTC
Requires
- php: ^5.3 || ^7.0
- voku/simple_html_dom: ^2.0
Requires (Dev)
- phpunit/phpunit: ^4.8.35 || ^5.7 || ^6.0
Suggests
- laravel/framework: Required to use the Laravel integration
This package is auto-updated.
Last update: 2024-08-27 18:19:38 UTC
README
一个将您的图片URL转换为Imagelint URL的类
安装
您可以使用 Composer 将此库添加到项目中
composer require imagelint/imagelint-php
使用方法
基本使用
Imagelint\Imagelint::get('http://yoursite.com/img/cat.jpg')
上面的代码生成以下输出
https://a1.imagelint.com/yoursite.com/img/cat.jpg
您还可以使用参数
Imagelint\Imagelint::get('http://yoursite.com/img/cat.jpg', ['width' => 200])
上面的代码将图片缩放为200px宽。