只有满足缓存条件的图片内容才会被转换

This commit is contained in:
刘祥超
2022-03-31 16:22:23 +08:00
parent f7ed942779
commit 7b0b9ac3b4

View File

@@ -443,6 +443,11 @@ func (this *HTTPWriter) PrepareWebP(resp *http.Response, size int64) {
return
}
// 只有在开启了缓存之后,才会转换,防止占用的系统资源过高
if this.req.cacheRef == nil {
return
}
var contentType = this.GetHeader("Content-Type")
if this.req.web != nil &&