Skip to content

nomidi/silverstripe-webp-image

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

silverstripe-webp-image

Build Status License

Introduction

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

Requirements

  • Silverstripe > 4.2
  • GDLib with webp Extension

Installation

composer require nomidi/silverstripe-webp-image

Usage

  • run dev/build?flush=1

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

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

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.

<?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

About

Silverstripe module for creation of webp images.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published