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(1y ago)25.2k↓40%MITRich Text FormatPHP ^8.1

Since Aug 5Pushed 1y 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 yesterday

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

32

—

LowBetter than 69% of packages

Maintenance32

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

694d 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.

751291.4k43](/packages/civicrm-civicrm-core)[kimai/kimai

Kimai - Time Tracking

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

Craft CMS

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

The most flexible and user-friendly form building plugin!

54681.3k18](/packages/solspace-craft-freeform)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)

PHPackages © 2026

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