Skip to content

Jekyll plugin to generate <picture> with original and webp image sources

Notifications You must be signed in to change notification settings

forestguild/forcewebp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Apr 4, 2019
bcd93a3 · Apr 4, 2019

History

1 Commit
Apr 4, 2019
Apr 4, 2019
Apr 4, 2019
Apr 4, 2019
Apr 4, 2019

Repository files navigation

Force WebP images for Jekyll

Gem Version

Very simple gem that will add <picture/> with your image and webp image url, example result:

<picture>
  <source type="image/webp" srcset="/assets/img/affixes/10.webp" />
  <source type="image/jpeg" srcset="/assets/img/affixes/10.jpg" />
  <img src="/assets/img/affixes/10.jpg" class="rounded-circle" />
</picture>

Usage

In layout add forcewebp filter, example: {{ content | forcewebp }}

About

Jekyll plugin to generate <picture> with original and webp image sources

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published