From fb5a0d87c48ea5543a830998ec066baffd9f1c15 Mon Sep 17 00:00:00 2001 From: listen <494177603@qq.com> Date: Fri, 19 Nov 2021 14:40:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- string.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/string.go b/string.go index 8588724..fd986e0 100755 --- a/string.go +++ b/string.go @@ -295,3 +295,13 @@ func TrimHtml(src string) string { src = re.ReplaceAllString(src, "\n") return strings.TrimSpace(src) } + + +/** + * 腾讯云图片压缩 + * @2021/11/19 + * @linsen + */ +func TencentCloudImageCompress(imgUrl,ratio string)string{ + return imgUrl + "?imageMogr2/thumbnail/"+ ratio +"x/interlace/1" +} \ No newline at end of file