PHPackages                             sujan97825/laravel-webp-converter - 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. sujan97825/laravel-webp-converter

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

sujan97825/laravel-webp-converter
=================================

Convert jpg,jpeg,png,webp image to webp,Compress &amp; Resize Image

v0.1.1(3y ago)2249↓100%MITPHPPHP &gt;=7.4

Since Dec 5Pushed 3y ago1 watchersCompare

[ Source](https://github.com/sujan97825/laravel-webp-converter)[ Packagist](https://packagist.org/packages/sujan97825/laravel-webp-converter)[ Docs](https://github.com/sujan97825/laravel-webp-converter)[ RSS](/packages/sujan97825-laravel-webp-converter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Laravel-webp-converter
======================

[](#laravel-webp-converter)

Convert jpg,jpeg,png,webp image to webp,Compress &amp; Resize Image.

---

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

[](#installation)

```
composer require sujan97825/laravel-webp-converter
```

Configuration
-------------

[](#configuration)

**Service Provider Registration**In `config/app.php`, add in `providers` array -

```
'providers' => [
    // ...
    Sujan\\LaravelWebpConverter\\WebpConverterServiceProvider::class,
    // ...
],
```

**Facade Class Alias**Add in aliases array -

```
'aliases' => Facade::defaultAliases()->merge([
    // ...
    'WebpConverter' => Sujan\LaravelWebpConverter\Facades\WebpConverter::class,
    // ...
])->toArray(),
```

Use from Controller
-------------------

[](#use-from-controller)

#### Import first the WebpConverter facade

[](#import-first-the-webpconverter-facade)

```
use Sujan\LaravelWebpConverter\Facades\WebpConverter;
```

API Docs
--------

[](#api-docs)

### Generate method -

[](#generate-method--)

```
WebpConverter::webpImage($file, $filename, $location, $width = null, $height = null, $quality = null);
```

```
/**
 * Convert image to webp.
 *
 * @param file $file
 * @param string $filename
 * @param string $location
 * @param integer $width
 * @param integer $height
 * @param integer $quality
 *
 * @return string
 * @throws \Exception
 */
public function webpImage(
    $file,
    $filename,
    $location,
    $width = null
    $height = null
    $quality = null
)
```

#### Input Type Demo

[](#input-type-demo)

```
  $file = $request->file("image"); //Request File
  $filename="abc"; //Image Name
  $location="assets/images/"; //Image Upload Location
  $width=500; // Image Width,If You Want To Resize.Default Null.
  $height=250; // Image Height,If You Want To Resize.Default Null.
  $quality=100 //Image Quality Can Be Used [ 1-100 ],Default 100.
```

#### Publish configuration

[](#publish-configuration)

```
php artisan vendor:publish --provider="Sujan\LaravelWebpConverter\WebpConverterServiceProvider"
```

#### Configurations

[](#configurations)

```
return [
    /*
    |--------------------------------------------------------------------------
    | Default Image  Quality
    |--------------------------------------------------------------------------
    |
    | Default 100, image quality can be used [1-100]
    |
    */
    'quality' => 100,
];

```

Contribution
------------

[](#contribution)

You're open to create any Pull request.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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 ~0 days

Total

2

Last Release

1255d ago

### Community

Maintainers

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

---

Top Contributors

[![ShekhSujan](https://avatars.githubusercontent.com/u/43309024?v=4)](https://github.com/ShekhSujan "ShekhSujan (8 commits)")

---

Tags

composer-packageimage-converterlaravellaravel-packagephpwebpwebp-converterlaravelWebp

### Embed Badge

![Health badge](/badges/sujan97825-laravel-webp-converter/health.svg)

```
[![Health](https://phpackages.com/badges/sujan97825-laravel-webp-converter/health.svg)](https://phpackages.com/packages/sujan97825-laravel-webp-converter)
```

###  Alternatives

[classic-o/nova-media-library

Tool and field that will let you managing files and add them to the posts

154172.0k](/packages/classic-o-nova-media-library)[tomatophp/filament-media-manager

Manage your media files using spatie media library with easy to use GUI for FilamentPHP

14543.9k3](/packages/tomatophp-filament-media-manager)[nikkanetiya/laravel-color-palette

Laravel Wrapper for `ksubileau/color-thief-php`. Grabs the dominant color or a representative color palette from an image. Uses PHP and GD or Imagick.

3312.6k](/packages/nikkanetiya-laravel-color-palette)

PHPackages © 2026

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