# Image Uploading Size Show Exceeding Though It's Less

**URL:** https://meta.discourse.org/t/image-uploading-size-show-exceeding-though-its-less/134637
**Category:** Support
**Created:** [28 בנובמבר,‏ 2019,‏ 3:21pm UTC](https://meta.discourse.org/t/image-uploading-size-show-exceeding-though-its-less/134637 "2019-11-28T15:21:37Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![YaserAlnajjar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yaseralnajjar/32/100729_2.png) [@YaserAlnajjar](https://meta.discourse.org/u/YaserAlnajjar)
#### Post date: [28 בנובמבר,‏ 2019,‏ 3:21pm UTC](https://meta.discourse.org/t/image-uploading-size-show-exceeding-though-its-less/134637/1 "2019-11-28T15:21:37Z")

</div>

Hi

Max size is set to 4 mb:

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/b/bbaa1dd0afd9e8dc7ae1dbdb8e105af25f01ecb4.png)

But when I upload a photo like this (around 2 mb), I get a message saying that it exceeds the 4 mb limit:

 ![ai](https://global.discourse-cdn.com/meta/original/3X/e/e/eed9977e1c25b838bffff18853f889e279dd207c.jpeg)

Is it a bug or am I missing something?

- I’m running on 2.4.0.beta6

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [28 בנובמבר,‏ 2019,‏ 8:54pm UTC](https://meta.discourse.org/t/image-uploading-size-show-exceeding-though-its-less/134637/2 "2019-11-28T20:54:38Z")

</div>

Did you restart your discourse instance after changing that setting?

---

<div class="post-metadata">

### Author: ![YaserAlnajjar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yaseralnajjar/32/100729_2.png) [@YaserAlnajjar](https://meta.discourse.org/u/YaserAlnajjar)
#### Post date: [29 בנובמבר,‏ 2019,‏ 11:11am UTC](https://meta.discourse.org/t/image-uploading-size-show-exceeding-though-its-less/134637/3 "2019-11-29T11:11:54Z")

</div>

I just tried this now with:

```plaintext
./launcher stop app
./launcher start app

```

And it still shows the same error, could this be related with S3 being used with Discourse?

---

<div class="post-metadata">

### Author: ![YaserAlnajjar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yaseralnajjar/32/100729_2.png) [@YaserAlnajjar](https://meta.discourse.org/u/YaserAlnajjar)
#### Post date: [12 בינואר,‏ 2020,‏ 1:40pm UTC](https://meta.discourse.org/t/image-uploading-size-show-exceeding-though-its-less/134637/4 "2020-01-12T13:40:12Z")

</div>

I guess the new update added a hint about fixing this, so here is the full guide for those who face the same issue… it’s all about nginx:

**1. Go to nginx folder:**

```plaintext
cd /etc/nginx

```

**2. Add this line to your `nginx.conf` file:**

```plaintext
http {
    ...
    client_max_body_size 4M;
}

```

This will allow nginx to accept files with a max size of 4 megabytes.

**3. Restart nginx:**

- If you’re paranoid like me use run `systemctl restart nginx`
- Or simply send the nginx restart signal by running `nginx -s reload`

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [13 בינואר,‏ 2020,‏ 5:00pm UTC](https://meta.discourse.org/t/image-uploading-size-show-exceeding-though-its-less/134637/5 "2020-01-13T17:00:03Z")

</div>

This topic was automatically closed after 26 hours. New replies are no longer allowed.
