Download the PHP package creode/laravel-image-optimiser without Composer

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

Laravel Image Optimiser

Installation

Package can be installed on a Laravel Project via composer.

Versions

This package utilises the Intervention Image Library behind the scenes and attempts to keep up to date with it. The following table shows the versions of the package and the versions of the Intervention Image Library that they use.

Package Version Intervention Version
1.0.* 2.7.*
2.0.* 3.*

Configuration

The package can be configured by publishing the config file.

This will create a new file in your config directory called image-optimiser.php. This file contains all the configuration options for the package.

Usage

This package aims to expose a simple route that allows you to optimise images on the fly. The route is /image/{preset} and will return the optimised image. The url/path of the image will be passed to the optimiser as a query parameter.

Rendering the image

In order to render the optimised image inside of a blade template, you can use the following code:

Caching

In order to save on processing for each image, the package will cache the optimised image. The cache is stored in Laravel's cache system and the lifetime can be configured in the image-optimiser.php config file. The cache is stored for 1 year by default. Passing null as the cache lifetime will disable the cache.

Extending

The package is designed to be extended to allow for different optimisation methods to be created and used. To do this you need to create a new class that implements the Modules\ImageOptimiser\app\Concerns\OptimiserInterface interface. This interface has only a single optimise method to be implemented.

Once that has been done, you just need to publish configuration for the package and update the image-optimiser.php config option to point to your new class.

Alternatively, you can override the optimiser service in the image-optimiser.php config file and point it to your new class.


All versions of laravel-image-optimiser with dependencies

PHP Build Version
Package Version
Requires intervention/image Version ^3.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 creode/laravel-image-optimiser contains the following files

Loading the files please wait ....