Merge remote-tracking branch 'origin/develop' into migrate/vuex-to-pinia

This commit is contained in:
Henry Jameson 2025-02-03 17:46:41 +02:00
commit 6dfb213dfe
12 changed files with 814 additions and 516 deletions

View file

@ -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

View file

@ -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"