diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 92f27a2bf0..4064f3f352 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -121,7 +121,7 @@ common: use-avatar-reversi-stones: "リバーシの石にアバターを使う" verified-user: "公式アカウント" disable-animated-mfm: "投稿内の動きのあるテキストを無効にする" - do-not-autoplay-animation: "アニメーションを自動再生しない" + do-not-autoplay-animation: "アニメーション画像を再生しない" suggest-recent-hashtags: "最近のハッシュタグを投稿フォームに表示する" always-show-nsfw: "常に閲覧注意のメディアを表示する" always-mark-nsfw: "常にメディアを閲覧注意として投稿" diff --git a/src/client/app/common/scripts/get-static-image-url.ts b/src/client/app/common/scripts/get-static-image-url.ts new file mode 100644 index 0000000000..f84adf709c --- /dev/null +++ b/src/client/app/common/scripts/get-static-image-url.ts @@ -0,0 +1,9 @@ +import { url as instanceUrl } from '../../config'; + +export function getStaticImageUrl(url: string): string { + const u = new URL(url); + const dummy = `${u.host}${u.pathname}`; // 拡張子がないとキャッシュしてくれないCDNがあるので + let result = `${instanceUrl}/proxy/${dummy}?url=${encodeURIComponent(u.href)}`; + result += '&static=1'; + return result; +} diff --git a/src/client/app/common/views/components/avatar.vue b/src/client/app/common/views/components/avatar.vue index 698873833d..205b4a6d79 100644 --- a/src/client/app/common/views/components/avatar.vue +++ b/src/client/app/common/views/components/avatar.vue @@ -15,6 +15,7 @@