PHPackages                             gevman/azure-thumbnails - 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. gevman/azure-thumbnails

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

gevman/azure-thumbnails
=======================

Create image thumbnails with help of Microsoft Artificial Intelligence, and show what needed! After uploading an image, a high quality thumbnail gets generated and the Computer Vision API algorithm analyzes the objects within the image, then crops it to fit the requirements of the “region of interest” (ROI).

1.0(9y ago)13211MITPHPPHP &gt;=5.5

Since Mar 19Pushed 9y ago3 watchersCompare

[ Source](https://github.com/gevorgmansuryan/azure-thumbnails)[ Packagist](https://packagist.org/packages/gevman/azure-thumbnails)[ RSS](/packages/gevman-azure-thumbnails/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Azure Thumbnails
================

[](#azure-thumbnails)

[![Latest Stable Version](https://camo.githubusercontent.com/5985e015b7922640c523b9595a49856c501c677bc004bf2c53bcdc4adf1de1f1/68747470733a2f2f706f7365722e707567782e6f72672f6765766d616e2f617a7572652d7468756d626e61696c732f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/gevman/azure-thumbnails)[![Latest Unstable Version](https://camo.githubusercontent.com/e763938a08ee817e51dbf857fafccd10ef3f49ed231efa8fe908524869e3b98d/68747470733a2f2f706f7365722e707567782e6f72672f6765766d616e2f617a7572652d7468756d626e61696c732f762f756e737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/gevman/azure-thumbnails)[![License](https://camo.githubusercontent.com/dce6abd787efee149264a5db06f5a422e87cc4ba9563cd1d89d6a3eaeaee7fff/68747470733a2f2f706f7365722e707567782e6f72672f6765766d616e2f617a7572652d7468756d626e61696c732f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/gevman/azure-thumbnails)

Create image thumbnails with help of Microsoft Artificial Intelligence, and show what needed!

A thumbnail is a small representation of a full-size image. Varied devices such as phones, tablets, and PCs create a need for different user experience (UX) layouts and thumbnail sizes. Using smart cropping, this Computer Vision API feature helps solve the problem.

After uploading an image, a high quality thumbnail gets generated and the Computer Vision API algorithm analyzes the objects within the image, then crops it to fit the requirements of the “region of interest” (ROI). The output gets displayed within a special framework as seen in below illustration. The generated thumbnail can be presented in a different aspect ratio than that of the original image to accommodate a user’s needs.

The thumbnail algorithm works as follows:

- Removes distracting elements from the image and recognizes the main object, the “region of interest” (ROI).
- Crops the image based on identified “region of interest”.
- Changes the aspect ratio to fit the target thumbnail dimensions.

[![gevman/azure-thumbnails](https://camo.githubusercontent.com/9dcd90772493b0520add217ddac4450ca410886515b2889c54100845f403f03b/687474703a2f2f692e696d6775722e636f6d2f593268493844382e706e67)](https://camo.githubusercontent.com/9dcd90772493b0520add217ddac4450ca410886515b2889c54100845f403f03b/687474703a2f2f692e696d6775722e636f6d2f593268493844382e706e67)

Installation (using composer)
-----------------------------

[](#installation-using-composer)

```
composer require gevman/azure-thumbnails
```

### Methods

[](#methods)

##### thumbnail(string $image, int $width, int $height)

[](#thumbnailstring-image-int-width-int-height)

###### Create thumbnail

[](#create-thumbnail)

- `$image` - full path of image
- `$width` - thumbnail width
- `$height` - thumbnail height

##### saveAs(string $file \[, int $quality = 99\])

[](#saveasstring-file--int-quality--99)

###### Save thumbnail to specified path

[](#save-thumbnail-to-specified-path)

- `$file` - full path of thumbnail
- `$quality` - thumbnail quality

##### show(\[int $quality = 99\]\[, string $contentType = 'image/jpeg'\])

[](#showint-quality--99-string-contenttype--imagejpeg)

###### Show thumbnail

[](#show-thumbnail)

- `$quality` - thumbnail quality
- `$contentType` - Content-Type header

### Example of usage

[](#example-of-usage)

###### Get your `Computer Vision API key` from [Microsoft Azure](https://portal.azure.com/#create/Microsoft.CognitiveServices/apitype/ComputerVision)

[](#get-your-computer-vision-api-key-from-microsoft-azure)

```
require '../vendor/autoload.php';

$generator = new \Gevman\Thumbnails\Generator('{Computer Vision API key}');

$thumb = $generator->thumbnail('/full/path/to/original.jpg', 1000, 500);

//will save thumbnail to specified path
$thumb->saveAs('/full/path/to/thumbnail.jpg', 100);

//will show thumbnail
$thumb->show();
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3390d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11891855?v=4)[Gevorg Mansuryan](/maintainers/gevorgmansuryan)[@gevorgmansuryan](https://github.com/gevorgmansuryan)

---

Top Contributors

[![gevorgmansuryan](https://avatars.githubusercontent.com/u/11891855?v=4)](https://github.com/gevorgmansuryan "gevorgmansuryan (11 commits)")

---

Tags

artificial-intelligenceazurecropimage-cropperimage-resizerimage-thumbnailsroithumbnailsazureThumbnailsartificial intelligenceimage resizerimage-cropper

### Embed Badge

![Health badge](/badges/gevman-azure-thumbnails/health.svg)

```
[![Health](https://phpackages.com/badges/gevman-azure-thumbnails/health.svg)](https://phpackages.com/packages/gevman-azure-thumbnails)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[urlbox/screenshots

Use urlbox to easily generate website thumbnail screenshots from a URL

11258.7k](/packages/urlbox-screenshots)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
