imagelint/imagelint-php

一个将您的图片URL转换为Imagelint URL的类

dev-master 2017-03-24 11:47 UTC

This package is auto-updated.

Last update: 2024-08-27 18:19:38 UTC


README

Build Status codecov

一个将您的图片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宽。