# Webp Plugin Felix Häberle

**URL:** <https://forum.getkirby.com/t/webp-plugin-felix-haberle/31073>\
**Category:** Plugins\
**Created:** [March 12, 2024, 2:40pm UTC](https://forum.getkirby.com/t/webp-plugin-felix-haberle/31073 "2024-03-12T14:40:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeichensetzer](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zeichensetzer](https://forum.getkirby.com/u/zeichensetzer)\
**Post date:** [March 12, 2024, 2:40pm UTC](https://forum.getkirby.com/t/webp-plugin-felix-haberle/31073/1 "2024-03-12T14:40:07Z")

</div>

Hi. I have installed Felix Häberles Plugin to convert JPG into WEBP. It all works fine, but in the frontend it displays both pictures JPG and WEBP. Is there anything to do extra? Kirby 3.9 is installed. Thanks.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 12, 2024, 5:14pm UTC](https://forum.getkirby.com/t/webp-plugin-felix-haberle/31073/2 "2024-03-12T17:14:25Z")

</div>

> [@zeichensetzer](#):
>
> It all works fine, but in the frontend it displays both pictures JPG and WEBP.

If that plugin just add extra files in your page folder (note, I don’t know the plugin) and you fetch all files from the folder, then you get all files.

Do you really need the plugin, given that you can convert images to webp on the fly using Kirby without a plugin.

---

<div class="post-metadata">

**Author:** ![zeichensetzer](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zeichensetzer](https://forum.getkirby.com/u/zeichensetzer)\
**Post date:** [March 13, 2024, 9:49am UTC](https://forum.getkirby.com/t/webp-plugin-felix-haberle/31073/3 "2024-03-13T09:49:26Z")

</div>

Thanks for your reply @texnixe. Can you tell me how to convert images in Kirby, we are new to this. Or where can I read about it? I haven’t found any information yet.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 13, 2024, 12:31pm UTC](https://forum.getkirby.com/t/webp-plugin-felix-haberle/31073/4 "2024-03-13T12:31:03Z")

</div>

That would be via our thumbs engine, which cannot only create thumbs but also convert to webp or avif: [Image thumbnails | Kirby CMS](https://getkirby.com/docs/guide/files/resize-images-on-the-fly)

---

<div class="post-metadata">

**Author:** ![zeichensetzer](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zeichensetzer](https://forum.getkirby.com/u/zeichensetzer)\
**Post date:** [March 19, 2024, 3:40pm UTC](https://forum.getkirby.com/t/webp-plugin-felix-haberle/31073/5 "2024-03-19T15:40:06Z")

</div>

I have this in my config file:

return [  
‘panel’ =\> [  
‘install’ =\> true,  
],  
‘thumbs’ =\> [  
‘format’ =\> ‘webp’  
],  
];

And I tried this in the template:

 \<?= $project-\>image()-\>thumb()?\>

But its only working this way:

 \<?= $project-\>image()-\>thumb(['width' =\> 200, 'format' =\> 'webp'])?\>

But I don’t want to have a fix image size.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 19, 2024, 3:47pm UTC](https://forum.getkirby.com/t/webp-plugin-felix-haberle/31073/6 "2024-03-19T15:47:17Z")

</div>

```auto
thumb(['format' => 'webp'])

```

without any size information should totally do the job

---

<div class="post-metadata">

**Author:** ![zeichensetzer](https://avatars.discourse-cdn.com/v4/letter/z/e495f1/32.png) [@zeichensetzer](https://forum.getkirby.com/u/zeichensetzer)\
**Post date:** [March 20, 2024, 2:01pm UTC](https://forum.getkirby.com/t/webp-plugin-felix-haberle/31073/7 "2024-03-20T14:01:26Z")

</div>

So I have to give the format ([‘format’ =\> ‘webp’]) in the config file AND in the template?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 20, 2024, 6:30pm UTC](https://forum.getkirby.com/t/webp-plugin-felix-haberle/31073/8 "2024-03-20T18:30:25Z")

</div>

> [@zeichensetzer](#):
>
> in the config file AND in the template

Well, theoretically, it should be possible to set it in the config only, and then overwrite in the template if needed. But that doesn’t seem to work if there are no other parameters for the thumb. Haven’t had a chance to debug this yet or examine the source code.

As an alternative you could create thumb default preset with just the format in the config, then you can call `thumb()` without any params.

```auto
    'thumbs' => [
		'presets' => [
			'default' => ['format' => 'webp']
		],
    ],

```
