Replies: 2 comments 2 replies
-
|
good 👍 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
我的图片好像都没添加/i,挺舒服的。 |
Beta Was this translation helpful? Give feedback.
2 replies
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.
-
v2 本地图片强制添加域名后缀,若从 v1 迁移则自动添加
i后缀,导致已经发布的图片全部失效。这显然是不可接受的... 😞 其实... 可以利用 web 服务器的 url rewrite 功能来干掉该死的后缀 😄
以 nginx 为例,只要在 host 配置文件中添加下面的代码:
完美搞定!(代码里的
i换成你自己设置的后缀,比如uploads)原理:本地图片的目录格式为
年/月/日/文件名,所以我们只要匹配这个格式的请求,在其前面添加上前缀就行了。Beta Was this translation helpful? Give feedback.
All reactions