默认出的png都好大,能不能出jpg,或者压缩一下画质也行
2 个赞
Not currently, you could transform it in the runtime yourself since there are tons of libraries converting image formats.
1 个赞
Could you name some for me? I’m a complete beginner and don’t know which one I can use.
1 个赞
There are really tons of them, you can just search for keywords in npmjs, the first coming to my brain is jpeg-js, which is really nice:
Note: although it recommends sharp and sharp is really good but unfortunately it is a nodejs add-on thus difficultly to be handled in Koishi.
1 个赞
如果可以,实际上我已经做了一个接口。它会自动压缩图片。返回的图片也就几十k了。
如果你需要,我把这个后端接口的文件发一下,自己部署
1 个赞
好呀,我试试看
1 个赞
4 个赞
好棒好棒好棒
1 个赞