Download the PHP package xbing2002/laravel-image-optimizer without Composer

On this page you can find all versions of the php package xbing2002/laravel-image-optimizer. 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 laravel-image-optimizer

Optimize images in your Laravel app

Latest Version on Packagist Build Status StyleCI Total Downloads

This package is the Laravel 5.4 and up specific integration of spatie/image-optimizer. It can optimize PNGs, JPGs, SVGs and GIFs by running them through a chain of various image optimization tools. The package will automatically detect which optimization binaries are installed on your system and use them.

Here's how you can use it:

You don't like facades you say? No problem! Just resolve a configured instance of Spatie\ImageOptimizer\OptimizerChain out of the container:

The package also contains a middleware to automatically optimize all images in an request.

Don't use Laravel you say? No problem! Just use the underlying spatie/image-optimizer directly.

Installation

You can install the package via composer:

The package will automatically register itself.

The package uses a bunch of binaries to optimize images. To learn which ones on how to install them, head over to the optimization tools section in the readme of the underlying image-optimizer package. That readme also contains info on what these tools will do to your images.

The package comes with some sane defaults to optimize images. You can modify that configuration by publishing the config file.

This is the contents of the config/image-optimizer file that will be published:

If you want to automatically optimize images that get uploaded to your application add the \Spatie\LaravelImageOptimizer\Middlewares\OptimizeImages::class in the http kernel.

Usage

You can resolve a configured instance of Spatie\ImageOptimizer\OptimizerChain out of the container:

Using the facade

You don't like facades you say? No problem! Just resolve a configured instance of Spatie\ImageOptimizer\OptimizerChain out of the container:

Using the middleware

All images that in requests to routes that use the optimizeImages-middleware will be optimized automatically.

Adding your own optimizers

To learn how to create your own optimizer read the "Writing custom optimizers" section in the readme of the underlying spatie/image-optimizer package.

You can add the fully qualified classname of your optimizer as a key in the optimizers array in the config file.

Example conversions

Here are some example conversions that were made by the optimizer.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

Contributing

Please see CONTRIBUTING for details.

Security

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

Postcardware

You're free to use this package (it's MIT-licensed), but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Samberstraat 69D, 2060 Antwerp, Belgium.

We publish all received postcards on our company website.

Credits

The idea of a middleware that optimizes all files in a request is taken from approached/laravel-image-optimizer.

Support us

Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.

Does your business depend on our contributions? Reach out and support us on Patreon. All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.

License

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


All versions of laravel-image-optimizer with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
laravel/framework Version ~5.7.0|~5.8.0
spatie/image-optimizer Version ^1.1.0
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 xbing2002/laravel-image-optimizer contains the following files

Loading the files please wait ....