yassine-as / laravel-webp
Laravel package for WebP image conversion and optimization
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 1
Open Issues: 0
pkg:composer/yassine-as/laravel-webp
Requires
- php: ^7.3|^8.0|^8.1|^8.2|^8.3
 - illuminate/support: ^7.0|^8.0|^9.0|^10.0|^11.0|^12.0
 - intervention/image: ^2.7|^3.0
 
Requires (Dev)
- orchestra/testbench: ^5.0|^6.0|^7.0|^8.0|^9.0|^10.0
 - phpunit/phpunit: ^8.5|^9.0|^10.0
 
This package is auto-updated.
Last update: 2025-10-27 10:47:26 UTC
README
A Laravel package for WebP image conversion and optimization.
Installation
composer require yassineas/laravel-webp
Configuration
Publish the configuration file:
php artisan vendor:publish --provider="YassineAS\LaravelWebp\Providers\WebpServiceProvider"
Usage
Basic Usage
use YassineAS\LaravelWebp\Facades\Webp; // Convert image to WebP $webpPath = Webp::convert('/path/to/image.jpg'); // Convert with quality setting $webpPath = Webp::convert('/path/to/image.jpg', 80); // Convert and resize $webpPath = Webp::convert('/path/to/image.jpg', 80, 800, 600);
Artisan Command
# Convert single image php artisan webp:convert /path/to/image.jpg # Convert all images in directory php artisan webp:convert-directory /path/to/images/