mirror of
https://github.com/paricafe/misskey.git
synced 2025-01-30 23:50:16 -06:00
opt compress rate
This commit is contained in:
parent
bac5b38d1f
commit
f0f5376d18
1 changed files with 4 additions and 4 deletions
|
@ -8,15 +8,15 @@ import { isWebpSupported } from './isWebpSupported.js';
|
|||
import type { BrowserImageResizerConfigWithConvertedOutput } from '@misskey-dev/browser-image-resizer';
|
||||
|
||||
const compressTypeMap = {
|
||||
'image/jpeg': { quality: 0.90, mimeType: 'image/webp' },
|
||||
'image/png': { quality: 1, mimeType: 'image/webp' },
|
||||
'image/webp': { quality: 0.90, mimeType: 'image/webp' },
|
||||
'image/jpeg': { quality: 0.85, mimeType: 'image/webp' },
|
||||
'image/png': { quality: 0.90, mimeType: 'image/webp' },
|
||||
'image/webp': { quality: 0.85, mimeType: 'image/webp' },
|
||||
'image/svg+xml': { quality: 1, mimeType: 'image/webp' },
|
||||
} as const;
|
||||
|
||||
const compressTypeMapFallback = {
|
||||
'image/jpeg': { quality: 0.85, mimeType: 'image/jpeg' },
|
||||
'image/png': { quality: 1, mimeType: 'image/png' },
|
||||
'image/png': { quality: 0.90, mimeType: 'image/png' },
|
||||
'image/webp': { quality: 0.85, mimeType: 'image/jpeg' },
|
||||
'image/svg+xml': { quality: 1, mimeType: 'image/png' },
|
||||
} as const;
|
||||
|
|
Loading…
Reference in a new issue