# Attachment compression

**URL:** https://meta.discourse.org/t/attachment-compression/229862
**Category:** Support
**Created:** [June 13, 2022, 9:40pm UTC](https://meta.discourse.org/t/attachment-compression/229862 "2022-06-13T21:40:40Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [June 13, 2022, 9:40pm UTC](https://meta.discourse.org/t/attachment-compression/229862/1 "2022-06-13T21:40:40Z")

</div>

I can see that images that are uploaded into posts are compressed and backups have a compression option. However I don’t see any option to compress attachments to posts. Is this possible or is possible to put this into a feature request (this will save disk space immensely when text logs/files are attached to posts which can grow significantly over time).

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [June 13, 2022, 11:32pm UTC](https://meta.discourse.org/t/attachment-compression/229862/2 "2022-06-13T23:32:14Z")

</div>

Search for _composer media optimization_ in your admin.

`/admin/site_settings/category/files?filter=composer%20media%20optimization`

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [June 14, 2022, 12:28am UTC](https://meta.discourse.org/t/attachment-compression/229862/3 "2022-06-14T00:28:17Z")

</div>

Thanks. That appears to be related to media files (images as I understand). This was a recent addition I remember tracking the client side optimization.

I was referring to attachments like zip files, text files, log files etc (non image).

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [June 14, 2022, 12:46am UTC](https://meta.discourse.org/t/attachment-compression/229862/4 "2022-06-14T00:46:08Z")

</div>

A zip file is already compressed, and I honestly doubt that text and log files are so large that compressing them will save significant amounts of space?

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [June 14, 2022, 1:11am UTC](https://meta.discourse.org/t/attachment-compression/229862/5 "2022-06-14T01:11:14Z")

</div>

On the forum I’m managing yes, the text files are a few GB in size because it’s a support forum, so community members upload log files and each one is 10’s of MB. They add up quickly.

Wondering if there’s an option to automatically drop attachments ie an expiration date. So if the text attachments can’t be compressed maybe they can be automatically dropped after X days?

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [June 14, 2022, 5:20am UTC](https://meta.discourse.org/t/attachment-compression/229862/6 "2022-06-14T05:20:50Z")

</div>

Do you need to keep those support topics? If you set a topic timer, they can be deleted automatically, and with them the attachments based on the `purge deleted uploads grace period` days setting.

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [June 14, 2022, 1:50pm UTC](https://meta.discourse.org/t/attachment-compression/229862/7 "2022-06-14T13:50:05Z")

</div>

Yea definitely because it’s a knowledge base for the community on how solve problems or where to look. However once solved the log attachments are not required.
