PHPackages                             ahp/thumbnail - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. ahp/thumbnail

ActiveLibrary[Image &amp; Media](/categories/media)

ahp/thumbnail
=============

Instant thumbnail maker for the images to use in views

110PHP

Since May 1Pushed 7y agoCompare

[ Source](https://github.com/A-H-Pooladvand/php-thumbnail)[ Packagist](https://packagist.org/packages/ahp/thumbnail)[ RSS](/packages/ahp-thumbnail/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP Thumbnail
=============

[](#php-thumbnail)

PHP Thumbnail is a **PHP image manipulation** library providing an easier and expressive way to create thumbnails to improve **SEO** of your website.

What it can do?
---------------

[](#what-it-can-do)

- Cropping image
- Resizing image
- Fitting image
- Changing quality of image
- Change width and height of image

Getting started
---------------

[](#getting-started)

- [Requirements](#requirements)
- [Installation](#installation)
- [Parameters](#parameters)
- [Examples](#examples)
- [License](#license)

Requirements
------------

[](#requirements)

- PHP &gt;=7.1
- intervention/image ^2.4@dev

Installation
------------

[](#installation)

`composer require ahp/thumbnail`

Once installed you can use it
`// Via helper function`
`img($path, $width, $height, $mode, $quality)`
OR
`// Via class`
`\Thumb\Thumb::make($path, $width, $height, $mode, $quality)`

afterward thumbnail will be create in same directory of given path named thumbnail

Parameters
----------

[](#parameters)

- path : Path of image `string|required`
- width : Desired width `int|null`
- height : Desired height `int|null`
- mode: one of `fit` or `resize` or `crop`
- quality : Quality of image `int|null = 100`

Examples
--------

[](#examples)

```
// Using img() helper function
