Download the PHP package dev-extensions/thumbnail-generator without Composer

On this page you can find all versions of the php package dev-extensions/thumbnail-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package thumbnail-generator

Thumbnail Generator

Branches

Package tự động tạo và tối ưu thumbnail images với hỗ trợ WebP cho Laravel CMS.

📋 Mục lục


🚀 Cài đặt

  1. Copy package vào thư mục: dev-extensions/libs/thumbnail-generator
  2. Đảm bảo package đã được autoload trong composer.json
  3. Service provider tự động được đăng ký: Dev\ThumbnailGenerator\Providers\ThumbnailGeneratorServiceProvider

✨ Tính năng


🎯 Facade (ThumbnailMedia)

Facade đã được tự động đăng ký và bind vào service container. Không cần cấu hình thêm.

Sử dụng trong Blade (không cần import)

Sử dụng trong PHP Class


🔄 Route Resize

URL Pattern

Parameters

Features

Ví dụ


🎨 WebP Optimization

Package tự động force output WebP cho tất cả image formats để tối ưu Google PageSpeed Insights.

Logic hoạt động

  1. Request: /resize/storage/news/image.jpg?w=300&h=200
  2. Check WebP source: Tự động tìm file storage/news/image.webp (nếu có từ AppMedia conversion)
  3. Nếu WebP source TỒN TẠI:
    • ✅ Dùng file WebP làm nguồn (tốt hơn)
    • ✅ Encode lại thành WebP với quality 85
    • ✅ Set Content-Type: image/webp
  4. Nếu WebP source KHÔNG TỒN TẠI:
    • ✅ Dùng file gốc (jpg/png/jpeg)
    • ✅ Encode thành WebP với quality 85
    • ✅ Set Content-Type: image/webp
  5. Auto cleanup: Tự động xóa file cache cũ (jpg/jpeg/png) khi tạo WebP mới

Điều kiện

Ví dụ


💾 Cache

Cache Strategy

Cache Headers

Headers này giúp tối ưu Google PageSpeed Insights và browser caching.

Auto Delete Thumbnails

Khi xóa file trong CMS:


🎨 Sử dụng

Trong Blade Template

Size Options

Trong PHP Controller


⚙️ Tùy chỉnh

WebP Quality

Mặc định: 85

Thay đổi trong PublicController.php:

Max Width Limit

Mặc định: 1800px

Thay đổi trong PublicController.php:

Cache Duration

Mặc định: 30 ngày

Thay đổi trong PublicController.php:

AppMedia Settings

Package tích hợp với AppMedia, sử dụng các settings từ admin panel:


⚠️ Lưu ý

File Path

WebP Optimization

Cache

ThumbnailMedia Integration


🔧 Troubleshooting

Lỗi: "Route not found"

Nguyên nhân: Route chưa được register

Giải pháp: Đảm bảo service provider đã được load và routes được register

Lỗi: "File not found"

Nguyên nhân: File không tồn tại trong public path

Giải pháp:

Response trả về Content-Type sai

Nguyên nhân: File cache cũ (jpg) đã tồn tại

Giải pháp:

WebP không được serve

Kiểm tra:

  1. File WebP có được tạo trong public/resize/?
  2. Content-Type header có đúng image/webp?
  3. File cache cũ (jpg) đã bị xóa chưa?

📄 License

This package is part of Laravel CMS project.


👥 Support

For issues and questions, please contact: [email protected]


Version: 1.1.0
Last Updated: 2025


All versions of thumbnail-generator with dependencies

PHP Build Version
Package Version
Requires dev-extensions/kernel Version v7.x-dev
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dev-extensions/thumbnail-generator contains the following files

Loading the files please wait ...