MM-49395: Increase compression for previews and emojis (#21985)
We also reduce the max size of uploaded emojis to 512KiB. https://mattermost.atlassian.net/browse/MM-49395 ```release-note Max size of uploaded emojis is now reduced to 512KiB to reduce image download bandwidth. ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1078292ac6
Коммит
a83170e753
@@ -160,7 +160,10 @@ func createProfileImage(username string, userID string, initialFont string) ([]b
|
||||
|
||||
buf := new(bytes.Buffer)
|
||||
|
||||
if imgErr := png.Encode(buf, dstImg); imgErr != nil {
|
||||
enc := png.Encoder{
|
||||
CompressionLevel: png.BestCompression,
|
||||
}
|
||||
if imgErr := enc.Encode(buf, dstImg); imgErr != nil {
|
||||
return nil, ImageEncodingError
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user