Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GET /proxy/avatar.webpでapngはwebpに変換されない #11684

Open
KisaragiEffective opened this issue Aug 12, 2023 · 3 comments
Open

GET /proxy/avatar.webpでapngはwebpに変換されない #11684

KisaragiEffective opened this issue Aug 12, 2023 · 3 comments
Labels
✨Feature This adds/improves/enhances a feature

Comments

@KisaragiEffective
Copy link
Collaborator

Summary

GET /proxy/avatar.webpでアバターが取得できますが、その中身は必ずしもWebPとは限らないので、どちらかの対応をしてほしいです:

  • WebPに再エンコーディングする (CPU使用率から厳し目?)
  • URL末尾の.webpを取り除く

Example

$ curl --head 'https://misskey.niri.la/proxy/avatar.webp?url=https%3A%2F%2Fmedia.niri.la%2Fmisskey%2F45f80fd8-a976-4e05-ab42-a01a6e7cad44.png&avatar=1' | grep -i 'Content-Type:'
content-type: image/apng
@KisaragiEffective KisaragiEffective added the ✨Feature This adds/improves/enhances a feature label Aug 12, 2023
@tamaina
Copy link
Contributor

tamaina commented Aug 12, 2023

バグじゃね(仕様だとしたらなんでこんな仕様にしたのか忘れた

@tamaina
Copy link
Contributor

tamaina commented Aug 12, 2023

「apng(sharpはapngをアニメーション画像として読めない!)かつアニメーション維持」の分岐に引っかかっていた

image

@tamaina tamaina changed the title GET /proxy/avatar.webpは必ずしもWebPを返さないので実態に合わせてほしい GET /proxy/avatar.webpでapngはwebpに変換されない Aug 12, 2023
@tamaina
Copy link
Contributor

tamaina commented Aug 12, 2023

Related to #9477 lovell/sharp#2375

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨Feature This adds/improves/enhances a feature
Projects
Development

No branches or pull requests

2 participants