From c3c956dcf56bba3a66e791d50bc1f2fea8cd00f2 Mon Sep 17 00:00:00 2001 From: Michael Li Date: Fri, 22 Jul 2022 18:41:59 +0800 Subject: [PATCH] web: support custom tweet image thumbnail argument in .env/.env.local --- web/.env | 7 +++++++ web/src/components/post-image.vue | 6 ++---- web/src/vite-env.d.ts | 2 ++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/web/.env b/web/.env index 7645f934..1db683f6 100644 --- a/web/.env +++ b/web/.env @@ -12,3 +12,10 @@ VITE_ALLOW_PHONE_BIND=true # 局部参数 VITE_DEFAULT_TWEET_VISIBILITY=public + +# 图片推文404参数 +VITE_DEFAULT_TWEET_IMAGE_404="https://paopao-assets.oss-cn-shanghai.aliyuncs.com/public/404.png" +# AliOSS 图片thumbnail参数 +VITE_TWEET_IMAGE_THUMBNAIL="?x-oss-process=image/resize,m_fill,w_300,h_300,limit_0/auto-orient,1/format,png" +# MinIOn 图片thumbnail参数 +# VITE_TWEET_IMAGE_THUMBNAIL="?x-oss-process=image/resize,m_fill,w_300,h_300,limit_0/auto-orient,1/format,png" diff --git a/web/src/components/post-image.vue b/web/src/components/post-image.vue index 179ed462..92595c50 100644 --- a/web/src/components/post-image.vue +++ b/web/src/components/post-image.vue @@ -225,10 +225,8 @@