Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ph-7/image-unsplash

:framed_picture: Get easily any Unsplash images with a clean PHP class. It's a really lightweight class that helps to get easily any images from Unsplash.com while keeping your project clean.
https://github.com/ph-7/image-unsplash

image library lightweight photo photography photos php-71 php71 picture unsplash unsplash-api unsplash-client unsplash-helper

Last synced: 2 days ago
JSON representation

:framed_picture: Get easily any Unsplash images with a clean PHP class. It's a really lightweight class that helps to get easily any images from Unsplash.com while keeping your project clean.

Awesome Lists containing this project

README

        

# Unsplash Helper

## Get Unsplash Images Easily

Get easily any Unsplash images with a clean PHP class.

It's a really lightweight and simple PHP class that helps you to get easily any images from Unsplash.com while keeping your project clean.

## Example

```php
use PH7\Image\Unsplash;

$unsplash = new Unsplash();
$unsplash->setWidth(600)
->setHeight(400)
->setQuality(80)
->setImageId('photo-1462045504115-6c1d931f07d1');

echo '';

$unsplash->setImageId('photo-1500045992661-f978470eaf7b');
$unsplash->setFit(Unsplash::MAX_FIT);

echo '';
```

## Installation

1. Install Composer (https://getcomposer.org)
2. Include it in your project:
```bash
composer require ph-7/image-unsplash
```

## Requirements

* PHP 7.1 or higher
* [Composer](https://getcomposer.org)

## Author

Made with ♥ and care by [Pierre-Henry Soria](http://ph7.me)

## License

[MIT License](https://opensource.org/licenses/mit-license.php). Enjoy! :smiley: