Download the PHP package ngfw/webpconverter without Composer

On this page you can find all versions of the php package ngfw/webpconverter. 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 webpconverter

WebP Converter Package

Latest Version on Packagist Total Downloads

The WebP Converter package is your go-to tool for converting images to the WebP format. It’s built to make your images smaller, faster, and more efficient without sacrificing quality. Whether you're dealing with JPEGs, PNGs, or even BMPs, this package handles them all with ease. It supports both GD and Imagick drivers, giving you flexibility depending on your server environment. And yes, it’s PSR-4 compliant, so it fits seamlessly into your modern PHP projects.

Installation

You can install the package via Composer:

After installing the package, you may want to publish the configuration file to customize the settings according to your project’s needs. To publish the configuration file, run the following command:

This will create a webp_converter.php file in your config directory. Inside this file, you can configure the following options:

driver: Specifies the image processing library to use (gd or imagick).

quality: Sets the default quality for WebP conversion.

storage_path: Defines the default storage path for the converted WebP images.

Example configuration file (config/webp_converter.php):

You can then customize these settings as needed to better fit your application’s requirements.

Usage

Using the WebP Converter is super simple. Here’s how you can integrate it into your project:

Loading an Image:

You can load an image from a local path or even a remote URL. The package is smart enough to handle both.

Example of generating Thumbnail image:

Setting Quality:

Want to control the quality of the output WebP image? No problem. Adjust the quality easily.

Resizing the Image:

Need to resize the image? Just specify the width and height.

Optimizing the Image:

Optimize your image to reduce file size even further. The package applies smart optimizations to deliver the best results.

Converting to WebP:

Finally, convert your image to WebP. You can even specify a custom filename for the output.

Chaining Multiple Methods:

You can chain multiple methods for a concise, single-line conversion:

Serving the Image:

Serve the WebP image directly, or get the raw data if you need to do something custom.

Blade Examples

Here are a couple of examples on how to use the WebP Converter in a Blade template:

Local Image Conversion: Convert a local image using Laravel's asset helper:

This will convert the image located at public/images/png1.png into WebP format and serve it.

Remote Image Conversion:

Convert an image from a remote URL:

This will download the image from the specified URL, convert it to WebP format, and then serve it.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email the author instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of webpconverter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
guzzlehttp/guzzle Version ^7.9
illuminate/support Version ^11.21
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 ngfw/webpconverter contains the following files

Loading the files please wait ....