2017 © Pedro Peláez
 

silverstripe-module silverstripe-webp-image

Create webp image on resize of jpg and png files

image

nomidi/silverstripe-webp-image

Create webp image on resize of jpg and png files

  • Friday, February 16, 2018
  • by bastianfritsch
  • Repository
  • 2 Watchers
  • 0 Stars
  • 20 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 11 % Grown

The README.md

silverstripe-webp-image

Build Status License, (*1)

Introduction

This module creates webp images from resized jpeg and png images. More Information about webp images https://developers.google.com/speed/webp/, (*2)

Requirements

  • Silverstripe > 4.2
  • GDLib with webp Extension

Installation

composer require nomidi/silverstripe-webp-image

Usage

  • run dev/build?flush=1, (*3)

  • force Browser to load webp image // Example 1 (default) edit .htaccess in your root directory, and add webp forwarding in compatible browsers, (*4)

  • force Browser to load webp image // Example 2 for information on usage of webp image in html see css-tricks.com, (*5)

Quick Testfile for checking if webp is available

Below you will find the code to quickly check if webp is available with the installed GD Library. Simply copy this code into a .php file in your root folder and open the file in a browser., (*6)

<?php

if (function_exists(imagewebp)) {
    echo "WebP is available";
} else {
    echo "WebP is not available";
}

TODO

  • documentation
  • IMagick Support
  • PHP test to check support
  • Delete Webp Image
  • Flush Webp Image

The Versions

16/02 2018

dev-master

9999999-dev

Create webp image on resize of jpg and png files

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

image silverstripe webp