Merge branch 'image-compression-setting' into 'develop'
Image compression setting See merge request pleroma/pleroma-fe!1996
This commit is contained in:
commit
eea173cf7e
5 changed files with 17 additions and 1 deletions
1
changelog.d/image-compression.add
Normal file
1
changelog.d/image-compression.add
Normal file
|
@ -0,0 +1 @@
|
|||
Added configurable image compression option in general settings, allowing users to control whether images are compressed before upload.
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue