PHPackages                             ucraft-com/thumbnail-generator - 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. ucraft-com/thumbnail-generator

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

ucraft-com/thumbnail-generator
==============================

This PHP package provides a comprehensive solution for generating thumbnails from various file types, including images, videos, PDF documents, and audio files.

1.0.0(2y ago)25.5k↓34.4%MITRich Text FormatPHP ^8.1

Since Aug 5Pushed 2y ago2 watchersCompare

[ Source](https://github.com/ucraft-com/thumbnail-generator)[ Packagist](https://packagist.org/packages/ucraft-com/thumbnail-generator)[ RSS](/packages/ucraft-com-thumbnail-generator/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (7)Versions (4)Used By (0)

Thumbnail Generator for Laravel
===============================

[](#thumbnail-generator-for-laravel)

Thumbnail Generator is a versatile Laravel package designed to create and manage thumbnails from various file types, including images, videos, audios, documents, and PDF files. This package provides a straightforward API to generate thumbnails and customize their dimensions and quality.

Features
--------

[](#features)

- **Multiple File Type Support**: Generate thumbnails from images (JPEG, PNG, GIF), videos, audios, documents, and PDF files.
- **WebP Support**: Generate WebP thumbnails for better compression and faster load times.
- **Customizable Dimensions**: Specify the width and height of the thumbnails.
- **Quality Control**: Adjust the quality of the generated thumbnails to balance between size and visual fidelity.
- **Aspect Ratio Maintenance**: Automatically maintain the aspect ratio of the original media.

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

[](#requirements)

- **PHP**: 8.1 or higher
- **Imagick PHP extension**: You need to have the [Imagick PHP extension](https://www.php.net/manual/en/book.imagick.php) installed and enabled to use the ThumbnailGenerator package.

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

[](#installation)

You can install the package via Composer:

```
composer require ucraft-com/thumbnail-generator

php artisan vendor:publish --provider="Uc\ThumbnailGenerator\ThumbnailGeneratorServiceProvider"
```

### Basic Usage

[](#basic-usage)

#### Images

[](#images)

```
use Uc\ThumbnailGenerator\ThumbnailGeneratorFactory;

$factory = new ThumbnailGeneratorFactory(...);
$gen = $factory->createImageThumbnailGenerator();
$content = $gen->generate($file, 200, 200);
```

#### WebP Thumbnails

[](#webp-thumbnails)

To generate WebP thumbnails, use the makeWebPAware method to decorate the ThumbnailGenerator instance:

```
use Uc\ThumbnailGenerator\ThumbnailGeneratorFactory;

$factory = new ThumbnailGeneratorFactory(...);
$gen = $factory->createImageThumbnailGenerator();
$webPGen = $factory->makeWebPAware($gen);

// Generate a WebP thumbnail using a decorated instance
[$content, $webPContent] = $webPGen->generate($file, 200, 200);
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

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

Every ~1 days

Total

3

Last Release

739d ago

Major Versions

0.0.2 → 1.0.02024-08-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/f27fc61586c657de576cc2eb314e50979fdae18730accb87589b5d4f41a674a7?d=identicon)[ucraft](/maintainers/ucraft)

---

Top Contributors

[![tiko-star](https://avatars.githubusercontent.com/u/23649500?v=4)](https://github.com/tiko-star "tiko-star (8 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ucraft-com-thumbnail-generator/health.svg)

```
[![Health](https://phpackages.com/badges/ucraft-com-thumbnail-generator/health.svg)](https://phpackages.com/packages/ucraft-com-thumbnail-generator)
```

###  Alternatives

[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

762297.9k53](/packages/civicrm-civicrm-core)[kimai/kimai

Kimai - Time Tracking

4.8k9.4k1](/packages/kimai-kimai)[craftcms/cms

Craft CMS

3.6k3.7M3.4k](/packages/craftcms-cms)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54686.7k25](/packages/solspace-craft-freeform)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.6k10](/packages/helsingborg-stad-municipio)[abydahana/aksara

Aksara is a modern, developer-friendly framework and CMS built on CodeIgniter 4, featuring rapid CRUD development, modular architecture, smart routing, flexible access control, API integration, and an AI assistant to make content management faster and smarter.

1141.2k](/packages/abydahana-aksara)

PHPackages © 2026

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