Download the PHP package s1syphos/kirby-webp without Composer

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

Kirby WebP

Release License Issues

This plugin generates WebP images alongside your uploaded JPGs & PNGs - so you don't have to.

Table of contents

What is it good for?

Absolutely .. smaller image size:

WebP is a method of lossy and lossless compression that can be used on a large variety of photographic, translucent and graphical images found on the web. The degree of lossy compression is adjustable so a user can choose the trade-off between file size and image quality. WebP typically achieves an average of 30% more compression than JPEG and JPEG 2000, without loss of image quality (see Comparative Study).

Google Developers

Current browser support for WebP images is decent (Chrome, Opera & most mobile browsers), although heavily depending on your target region (ranging from North America (60%) & Europe (65%) to over 80% in Africa & South America).

For further information, including criticism, check out its Wikipedia article. That being said, another interesting approach gearing towards the replacement of JPEG is Fabrice Bellard's "Better Portable Graphics" (BPG) format.

Getting started

Use one of the following methods to install & use kirby-webp:

Composer

Git submodule

If you know your way around Git, you can download this plugin as a submodule:

Clone or download

  1. Clone or download this repository.
  2. Unzip / Move the folder to site/plugins.

Activate the plugin

Activate the plugin with the following line in your config.php:

Configuration

After uploading some images, you are now officially ready to serve their newly generated WebP versions.

Apache

If you're using Apache as your webserver, add the following lines to your .htaccess:

NGINX

If you're using NGINX as your webserver, add the following lines to your virtual host setup (for more information, go here or there):

Options

Change kirby-webp options to suit your needs:

Option Type Default Description
plugin.kirby-webp.hooks Array ['upload'] Contains all panel.file.* hooks WebP generation should be applied to (allowed values are upload, update, rename and replace).
plugin.kirby-webp.quality Integer 90 Defines WebP image quality (ranging from 0 to 100).
plugin.kirby-webp.stripMetadata Boolean true Optionally enables / disables transfer of JPEG metadata onto the WebP image.
plugin.kirby-webp.convertedImage Boolean true Optionally enables / disables output of converted image (false results in text output about the conversion process).
plugin.kirby-webp.serveOriginalOnFail Boolean true Defines behavior in case all converters fail - by default, the original image will be served, whereas false will generate an image with the error message.
plugin.kirby-webp.converters Array ['gd', 'cwebp'] Defines the desired order of execution for all supported converters (allowed values are imagick, cwebp, gd and ewww). Note that this only changes their order, but doesn't remove any of them.

Troubleshooting

Despite stating that An unexpected error occurred, WebP generation after renaming / updating images works - replace doesn't work at all .. PRs are always welcome :champagne:

Because of that, only upload is included by default. If you wish to investigate this further and / or don't care too much about the errror, go ahead with c::set('plugin.webp.actions', ['upload', 'update', 'rename', 'replace']); in your config.php.

Credits / License

kirby-webp is based on Bjørn Rosell's PHP library webp-convert library. It is licensed under the next step?

Special Thanks

I'd like to thank everybody that's making great software - you people are awesome. Also I'm always thankful for feedback and bug reports :)


All versions of kirby-webp with dependencies

PHP Build Version
Package Version
Requires rosell-dk/webp-convert Version dev-patch-1
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 s1syphos/kirby-webp contains the following files

Loading the files please wait ....