PHPackages                             nomidi/silverstripe-webp-image - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. nomidi/silverstripe-webp-image

ActiveSilverstripe-vendormodule[Image &amp; Media](/categories/media)

nomidi/silverstripe-webp-image
==============================

Create webp image on resize of jpg and png files

114.6k16[5 issues](https://github.com/nomidi/silverstripe-webp-image/issues)[4 PRs](https://github.com/nomidi/silverstripe-webp-image/pulls)PHP

Since Feb 16Pushed 1y ago4 watchersCompare

[ Source](https://github.com/nomidi/silverstripe-webp-image)[ Packagist](https://packagist.org/packages/nomidi/silverstripe-webp-image)[ RSS](/packages/nomidi-silverstripe-webp-image/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

silverstripe-webp-image
=======================

[](#silverstripe-webp-image)

[![Build Status](https://camo.githubusercontent.com/5f6aeebbadb6e1ab0fa20579567f58464609f7750db3a6e5e430d707ae9bfd3d/68747470733a2f2f7472617669732d63692e6f72672f6e6f6d6964692f73696c7665727374726970652d776562702d696d6167652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/nomidi/silverstripe-webp-image)[![License](https://camo.githubusercontent.com/da6e2a7ad04f457d77f3fdfdce53f1f6335e3596cbe60d7778df32decfd422e3/68747470733a2f2f706f7365722e707567782e6f72672f6e6f6d6964692f73696c7665727374726970652d776562702d696d6167652f6c6963656e7365)](https://packagist.org/packages/nomidi/silverstripe-webp-image)

Introduction
------------

[](#introduction)

This module creates webp images from resized jpeg and png images. More Information about webp images

Requirements
------------

[](#requirements)

- Silverstripe &gt; 4.2
- GDLib with webp Extension

Installation
------------

[](#installation)

```
composer require nomidi/silverstripe-webp-image
```

Usage
-----

[](#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](https://css-tricks.com/using-webp-images/)

Quick Testfile for checking if webp is available
------------------------------------------------

[](#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.

```
