Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 62 | All time: 10,456 This week: 524 |
Version | License | PHP version | Categories | |||
image-unsplash 1.0 | MIT/X Consortium ... | 7.1 | Graphics, Web services, PHP 7 |
Description | Author | |
This class can display images from Unsplash.com. |
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.
use PH7\Image\Unsplash;
$unsplash = new Unsplash();
$unsplash->setWidth(600)
->setHeight(400)
->setQuality(80)
->setImageId('photo-1462045504115-6c1d931f07d1');
echo '<img src="' . $unsplash->getImage() . '">';
$unsplash->setImageId('photo-1500045992661-f978470eaf7b');
$unsplash->setFit(Unsplash::MAX_FIT);
echo '<img src="' . $unsplash->getImage() . '">';
Include it in your project:
composer require ph-7/image-unsplash
Made with ? and care by Pierre-Henry Soria
MIT License. Enjoy! :smiley:
Files (7) |
File | Role | Description | ||
---|---|---|---|---|
src (1 directory) | ||||
tests (1 directory) | ||||
composer.json | Data | Auxiliary data | ||
phpunit.xml.dist | Data | Auxiliary data | ||
README.md | Doc. | Documentation |
Files (7) | / | src | / | Image |
File | Role | Description |
---|---|---|
InvalidAutoException.php | Class | Class source |
InvalidFitException.php | Class | Class source |
Unsplash.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.