Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 552 Bytes

File metadata and controls

17 lines (12 loc) · 552 Bytes

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