alimi7372/webp-convertor

A utility Laravel package to convert images to WebP format

Installs: 174

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/alimi7372/webp-convertor

v1.1.2 2025-07-27 11:50 UTC

This package is auto-updated.

Last update: 2025-09-27 12:39:45 UTC


README

This package allows you to convert images to WebP format and reduce their file size in your Laravel application.

Installation

You can install the package via composer:

composer require yourname/laravel-webp

Usage

To convert an image to WebP format, use the following:

use Alimi7372\Webp\WebpService;

app('webp')->convert($imagePath, $outputPath);

Running Tests

To run the tests for this package, simply use:

composer test

Facade Usage

This package includes a Facade for easier usage. You can use the WEBP::convert() method to convert images to WebP format.

Example:

use Alimi7372\Webp\Facades\WebpFacade as WEBP;

WEBP::convert($imagePath, $outputPath, 75);

Helpers

This package includes a helper function convert_to_webp to simplify the conversion of images to WebP format:

convert_to_webp($imagePath, $outputPath, 75);