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.
```
Этот коммит содержится в:
Agniva De Sarker
2023-01-05 19:34:22 +05:30
коммит произвёл GitHub
родитель 1078292ac6
Коммит a83170e753
14 изменённых файлов: 12 добавлений и 8 удалений

Просмотреть файл

@@ -45,7 +45,9 @@ func NewEncoder(opts EncoderOptions) (*Encoder, error) {
e.sem = make(chan struct{}, opts.ConcurrencyLevel)
}
e.opts = opts
e.pngEncoder = &png.Encoder{}
e.pngEncoder = &png.Encoder{
CompressionLevel: png.BestCompression,
}
return &e, nil
}