如何正常显示在notion上传的avif图片?(含gainmap) #2894
Unanswered
RichardLiuda
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
众所周知,notion支持avif格式的解析和gainmap的支持(直接通过notion官方的分享链接是可以正常显示的),但是通过notionnext来加载页面时,图片会被压缩为webp,并且gainmap层也被去除。尝试过更改next.js中的配置,仍然不生效。
浏览器中不正常显示的avif图片(被解析为webp)状态是302,是重定向至www.notion.so/image/……的。访问一下发现重定向的链接中图片已经是webp(被压缩过)了。并且在博客中图片信息中有cloudflare的字段。怀疑是notion使用cloudflare作为在第三方访问的代理,将其进行了压缩。
而如果直接用file.notion.so/f/f/……进行访问是正常显示的,但是这貌似要向notion服务器端请求临时的签名以进行访问,这样又会使程序复杂化,影响网站性能。
想问问大佬们有没有解决思路
Beta Was this translation helpful? Give feedback.
All reactions