Merge remote-tracking branch 'origin/develop' into migrate/vuex-to-pinia
This commit is contained in:
commit
6dfb213dfe
12 changed files with 814 additions and 516 deletions
|
|
@ -76,9 +76,9 @@ const mediaUpload = {
|
|||
const testCanvas = document.createElement('canvas')
|
||||
const supportsWebP = testCanvas.toDataURL('image/webp').startsWith('data:image/webp')
|
||||
|
||||
// Convert to WebP if supported, otherwise JPEG
|
||||
const type = supportsWebP ? 'image/webp' : 'image/jpeg'
|
||||
const extension = supportsWebP ? '.webp' : '.jpg'
|
||||
// Convert to WebP if supported and alwaysUseJpeg is false, otherwise JPEG
|
||||
const type = (!this.$store.getters.mergedConfig.alwaysUseJpeg && supportsWebP) ? 'image/webp' : 'image/jpeg'
|
||||
const extension = type === 'image/webp' ? '.webp' : '.jpg'
|
||||
|
||||
// Remove the original extension and add new one
|
||||
const newFileName = file.name.replace(/\.[^/.]+$/, '') + extension
|
||||
|
|
|
|||
|
|
@ -269,6 +269,14 @@
|
|||
{{ $t('settings.image_compression') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting
|
||||
path="alwaysUseJpeg"
|
||||
expert="1"
|
||||
>
|
||||
{{ $t('settings.always_use_jpeg') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting
|
||||
path="useContainFit"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue