Imgbot icon indicating copy to clipboard operation
Imgbot copied to clipboard

Feature Request: Support conversion to webp format

Open aditya-leap opened this issue 3 years ago • 6 comments

Request for new feature: Please enable conversion to WebP format for images, such that all uploaded images (jpg,png) are automatically converted to WebP format

aditya-leap avatar Nov 01 '21 11:11 aditya-leap

This is a really good suggestion, I think this will be implemented as another setting in .imgbotconfig would you also find it useful as a global toggle here: https://imgbot.net so it will apply to all repositories ?

GrigoreMihai avatar Nov 01 '21 21:11 GrigoreMihai

I'd like it as global toggle as well, respectively IMHO it makes sense to have it globally enabled OOTB as there is no reason to handle webp any different than JPEG or PNG. But this is more a minor convenience question: Having support at all, via .imgbotconfig or any other way, would be great 🙂.

EDIT: Globally enabled by default was meant for webp optimisation, but conversion shouldn't be enabled by default of course.

MichaIng avatar Nov 24 '21 13:11 MichaIng

Hello, me and a lab partner are looking to implement this feature as part of a course in devops at KTH. Any tips before we start?

LukasGutenberg avatar May 06 '22 13:05 LukasGutenberg

Here’s some basic info on webp: https://developers.google.com/speed/webp

DaveSkender avatar May 06 '22 13:05 DaveSkender

Thanks, you can expect a PR sometime next week or early the following one.

LukasGutenberg avatar May 06 '22 13:05 LukasGutenberg

We have problems running it locally on our computers. Line 16 in CompressImagesFunction.csproj

<Copy SourceFiles="@(NativeBinary)" DestinationFiles="@(NativeBinary->'$(TargetDir)bin/%(Filename)%(Extension)')" />

We get errors that claim it can't copy those files as they cannot be found. Do we have to download these or how do we resolve this?

EDIT: For running it on a local machine those lines aren't needed so we removed them to get it running. It's just we have difficulties testing the functions as the documentation for how to run things is lacking.

EDIT2: We have decided to drop this, as we've run out of time. If anyone else is willing to tackle this issue, go ahead.

Autonymic avatar May 11 '22 12:05 Autonymic