Download the PHP package gesagtgetan/krakenoptimizer without Composer

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


GesagtGetan.KrakenOptimizer

Image optimizer for Neos utilizing the Kraken API

Version Neos
1.x 2.3 LTS
2.x 3.x, 4.x
3.x 5.x

Installation

Create a Kraken account on https://kraken.io and generate new API Keys on https://kraken.io/account/api-credentials.

Add the credentials to your global Settings.yaml:

Usage

Warning:

⚠ As with any plugin that actively works on your database and resources it is a good idea to make sure you keep regular backups for your website. No known disasters have been caused by this plugin, but it's always better to be safe than sorry.

  1. We usually want to optimize all existing resources. We can do this by running this CLI command

All existing thumbnails will be replaced by optimized version from Kraken. By default we perform lossy optimizations, because this can dramatically decrease image size, while no noticeable decrease in image quality should occur. You can change the optimization strategy by altering the krakenOptions in the settings (set lossy: false), along with other arbitrary Kraken API options (see https://kraken.io/docs/).

Tip:

In case something goes wrong during the initial optimization, it's possible to resume optimization from a preferred offset. For example ./flow kraken:optimize --offset 300 will skip the first 299 thumbnails.

Warning:

⚠ Executing this command multiple times will send potentially already optimized images to the Kraken API and thus will still count towards your API quota and can lead to "over optimized" images when running lossy optimizations multiple times.

  1. Now is the perfect time to activate live optimizations. All generated thumbnails after the initial optimiziation will be send to kraken for improvement when this flag is set:

♻ Don't forget to flush your caches after adding the flag in a production environment.

  1. Delete Production cache

Additional options

optimizeOriginalResource

By enabling the optimizeOriginalResource flag, the original image will be replaced with an optimized version, if no thumbnail creation was necessary for a particular image. Neos will not create a thumbnail for an image, if the the necessary dimensions are equal or lower than the original image.

By default we do not optimize original images. Make sure you have regular backups of your server, in case something goes wrong during optimization!

Usage:

Troubleshooting and FAQ

Q: I already optimized my thumbnails before installing this plugin, but I'm unhappy with the result

A: If your thumbnails already show signs of high compression like artefacts, this plugin can not restore that missing information. In that case it's necessary to clear all your existing thumbnails with ./flow media:clearthumbnails. Be aware that this can put a lot of load on your server since all thumbnails need recreation, when a page has been called. You can activate liveOptimization right away, or optimize the created thumbnails later by running ./flow kraken:optimize.

If you need all your thumbnails in all your preset sizes, you can pre-generate them by running ./flow media:createthumbnails and ./flow media:renderthumbnails. Either optimize afterwads or have liveOptimization activated.


All versions of krakenoptimizer with dependencies

PHP Build Version
Package Version
Requires neos/neos Version ^5.0
guzzlehttp/guzzle Version ~6.0
ext-json Version *
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 gesagtgetan/krakenoptimizer contains the following files

Loading the files please wait ...