Skip to content
Snippets Groups Projects
Commit eea173cf authored by HJ's avatar HJ :fire:
Browse files

Merge branch 'image-compression-setting' into 'develop'

Image compression setting

See merge request !1996
parents 0a5de96f a3966ce2
No related branches found
No related tags found
1 merge request!1996Image compression setting
Pipeline #51441 passed
Added configurable image compression option in general settings, allowing users to control whether images are compressed before upload.
\ No newline at end of file
......@@ -34,6 +34,11 @@ const mediaUpload = {
return file
}
// Skip if image compression is disabled
if (!this.$store.getters.mergedConfig.imageCompression) {
return file
}
// For PNGs, check if animated
if (file.type === 'image/png') {
const isAnimated = await this.isAnimatedPng(file)
......
......@@ -241,6 +241,14 @@
</li>
</ul>
<h3>{{ $t('settings.attachments') }}</h3>
<li>
<BooleanSetting
path="imageCompression"
expert="1"
>
{{ $t('settings.image_compression') }}
</BooleanSetting>
</li>
<li>
<BooleanSetting
path="useContainFit"
......
......@@ -439,6 +439,7 @@
"allow_following_move": "Allow auto-follow when following account moves",
"attachmentRadius": "Attachments",
"attachments": "Attachments",
"image_compression": "Compress images before uploading",
"avatar": "Avatar",
"avatarAltRadius": "Avatars (notifications)",
"avatarRadius": "Avatars",
......
......@@ -190,7 +190,8 @@ export const defaultState = {
unsavedPostAction: undefined, // instance default
autoSaveDraft: undefined, // instance default
useAbsoluteTimeFormat: undefined, // instance default
absoluteTimeFormatMinAge: undefined // instance default
absoluteTimeFormatMinAge: undefined, // instance default
imageCompression: true
}
// caching the instance default properties
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment