# Resizing images off server

**URL:** https://meta.discourse.org/t/resizing-images-off-server/329329
**Category:** Support
**Created:** [October 4, 2024, 11:23am UTC](https://meta.discourse.org/t/resizing-images-off-server/329329 "2024-10-04T11:23:25Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![flash](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@flash](https://meta.discourse.org/u/flash)
#### Post date: [October 4, 2024, 11:23am UTC](https://meta.discourse.org/t/resizing-images-off-server/329329/1 "2024-10-04T11:23:25Z")

</div>

I have a question about resizing images. I want to use a offline image compression tool. If I were to download the uploads, do the resizes, then delete the server side and upload the structure back the same way, all I would need to do is ./launcher rebuild app and rebake the posts?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 4, 2024, 5:44pm UTC](https://meta.discourse.org/t/resizing-images-off-server/329329/2 "2024-10-04T17:44:46Z")

</div>

> [@flash](#):
>
> I want to use a offline image compression tool.

What problem are you trying to solve?

> [@flash](#):
>
> do the resizes, then delete the server side and upload the structure back the same way,

with exactly the same filenames? And even then, you could have issues with the file SHAs.

I think the thing to do will be to get Discourse to do the resizes the way that you want them.

---

<div class="post-metadata">

### Author: ![flash](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@flash](https://meta.discourse.org/u/flash)
#### Post date: [October 4, 2024, 7:47pm UTC](https://meta.discourse.org/t/resizing-images-off-server/329329/3 "2024-10-04T19:47:19Z")

</div>

i want all the originals resized less then 100kb with no resolution changes. I found a site that does it without issues but to save overall space on the server. the file name i can rechange in bulk to delete the extension it gives.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 4, 2024, 7:53pm UTC](https://meta.discourse.org/t/resizing-images-off-server/329329/4 "2024-10-04T19:53:34Z")

</div>

If you are going to let users on your forum upload images, you want a solution that will work for the future, not just the past. So you want to figure out what settings Discourse offers you to save as much space as is feasible within your parameters.

I’d recommend storing images on S3 so you don’t care so much about how much space costs. But that doesn’t help.

I think you just want to change `max_image_height` and `max_image_width` and maybe also `max image size kb`.

---

<div class="post-metadata">

### Author: ![flash](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@flash](https://meta.discourse.org/u/flash)
#### Post date: [October 4, 2024, 7:56pm UTC](https://meta.discourse.org/t/resizing-images-off-server/329329/5 "2024-10-04T19:56:25Z")

</div>

I already changed the size they can upload but still have a lot of space. Ive been banned from S3 before from what i believe was due to my location at the time but they never gave a reason. I tried to contact them and never a response at the time. I dont want to waste time with them.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 4, 2024, 7:59pm UTC](https://meta.discourse.org/t/resizing-images-off-server/329329/6 "2024-10-04T19:59:28Z")

</div>

There are many S3 providerers now. See [Configure an S3 compatible object storage provider for uploads](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916).

I’m pretty sure that even if you can figure out how to do what you’re trying to do, you’ll be sorry that you did.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [October 5, 2024, 6:56am UTC](https://meta.discourse.org/t/resizing-images-off-server/329329/7 "2024-10-05T06:56:06Z")

</div>

> [@flash](#):
>
> i want all the originals resized less then 100kb with no resolution changes

How is that even possible? If an image is resized, then its resolution is changed. Those are same thing. Or don’t I understand the question?

---

<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: [October 5, 2024, 8:22am UTC](https://meta.discourse.org/t/resizing-images-off-server/329329/8 "2024-10-05T08:22:26Z")

</div>

TS means: to apply a higher (jpeg) compression ratio.  
That will keep the same width x height and reduce file size.

There are some settings for this in Settings - Files

- recompress original jpg quality
- png to jpg quality
- image preview jpg quality
- composer media optimization image encode quality

For historical files, you don’t need an external service. You can do it on-server by going through all your uploaded files and running

`mogrify -quality XX filename.jpg` where XX is the quality%.

That said, I do agree with @pfaffman that it’s better to save on storage costs by finding a less expensive storage service. What is an acceptable image quality right now isn’t in 5 years, and you’ll regret having done it. After all, there’s no way back when you lower the quality of an image.
