qor / media

Media add uploading files to cloud or other destinations with support for image cropping and resizing features to any structs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to use vips handler ?

opened this issue · comments

Hi guys,

Hope you are all well !

As anybody tried to use the vips handler ? Is there any code snippets/gist showing how to register the handler ?

Cheers,
X

@azumads , thanks for the README info at https://github.com/qor/media/tree/master/handlers/vips

Bu how do you hook it to qor ? Do you have a code snippet/gist ?

As I wrote in readme ,

Usage
Setup media library and add below code, then it will compress jpg/png and generate webp for you.

import "github.com/qor/media/handlers/vips"

vips.UseVips(vips.Config{EnableGenerateWebp: true})

It will replace the image crop handler in https://github.com/qor/media/blob/master/handlers.go

Thanks for the reply !

I'll have a try because imaging is slow for my batch scripts.

Btw, I made https://paper2code.com/ with qor framework.
So I used extensively your work guys, good job ! 👍

Now, I just need to figure out the answer for the issue qor/admin#223 and we are good. Can you help me on this one ?

Thanks for your reply !

Can you ping anybody from your team who can give me a hand on that ?