Download the PHP package setono/sylius-image-optimizer-plugin without Composer

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

Sylius Image Optimizer Plugin

Latest Version Latest Unstable Version Build Status Code Coverage

Optimize the images in your Sylius store! Works only with kraken.io at the moment, but will work with other vendors in the future.

Have you seen this message from Google page speed tools: "Serve images in next-gen formats", this is the plugin to use.

It will both optimize your jpegs, but also convert them to webp and serve the webp images to browsers that support webp (i.e. Chrome).

Installation

Step 1: Download the plugin

This will also install the Kraken.io Bundle which is need for configuring the API keys.

Step 2: Enable the plugin

Then, enable the plugin by adding it to the list of registered plugins/bundles in the config/bundles.php file of your project:

Make sure you add it before SyliusGridBundle, otherwise you'll get You have requested a non-existent parameter "setono_sylius_image_optimizer.model.savings.class". exception.

Step 3: Configure the plugin

Add the resources (image resources) that should be optimized. In the example below a product image is optimized and the filter sets that are optimized are the default frontend filter sets for products.

This is also the step where you need your API key and secret from kraken.io.

Step 4: Configure Symfony Messenger

If you haven't used Symfony Messenger before, you need to specify a default bus like so:

Step 4.1: Using asynchronous transport (optional, but recommended)

All commands in this plugin will extend the CommandInterface and all events will extend the EventInterface.

Therefore, you can route all commands and events easily by adding this to your Messenger config:

Step 5: Extend image resources

The following example is for the product images. You should follow this procedure for all image resources you want to optimize.

Step 6: Update database

Last step is to create a diff for your current database schema and migrate that schema.

Usage

Now run this command to optimize your images:

Testing

If you want to test this plugin you can setup ngrok to tunnel requests to your localhost:

  1. Download and install ngrok
  2. Run your local web server: symfony serve --allow-http (the allow-http is important since ngrok always tunnels to the non secure localhost)
  3. Run ngrok: ngrok http 8000

All versions of sylius-image-optimizer-plugin with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
ext-mbstring Version *
doctrine/common Version ^2.13 || ^3.0
doctrine/event-manager Version ^1.1
doctrine/orm Version ^2.7
doctrine/persistence Version ^1.3 || ^2.0
knplabs/knp-menu Version ^3.1
liip/imagine-bundle Version ^2.3
psr/container Version ^1.0
psr/log Version ^1.1
setono/doctrine-orm-batcher Version ^0.6
setono/doctrine-orm-batcher-bundle Version ^0.3.1
setono/kraken-io-bundle Version ^1.0
setono/kraken-io-php-sdk Version ^1.1
sylius/resource-bundle Version ^1.6
symfony/config Version ^4.4 || ^5.0
symfony/console Version ^4.4 || ^5.0
symfony/dependency-injection Version ^4.4 || ^5.0
symfony/event-dispatcher Version ^4.4 || ^5.0
symfony/http-client-contracts Version ^2.3
symfony/http-foundation Version ^4.4 || ^5.0.7
symfony/lock Version ^4.4 || ^5.0
symfony/messenger Version ^4.4 || ^5.0
symfony/mime Version ^4.4 || ^5.0
symfony/routing Version ^4.4 || ^5.0
symfony/service-contracts Version ^2.2
thecodingmachine/safe Version ^1.0
twig/twig Version ^2.14
webimpress/safe-writer Version ^2.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 setono/sylius-image-optimizer-plugin contains the following files

Loading the files please wait ....