# Misleading message when image size limit changed

**URL:** https://meta.discourse.org/t/misleading-message-when-image-size-limit-changed/139971
**Category:** Bug
**Created:** [January 28, 2020, 6:33pm UTC](https://meta.discourse.org/t/misleading-message-when-image-size-limit-changed/139971 "2020-01-28T18:33:36Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [January 28, 2020, 6:33pm UTC](https://meta.discourse.org/t/misleading-message-when-image-size-limit-changed/139971/1 "2020-01-28T18:33:36Z")

</div>

I embedded a series of URLs to some particularly large images, and when I checked back the expected ‘image larger than 4096kb’ message was displayed next to the links.

As it’s a private instance I amended `max attachment size kb` and `max image size kb` to 12288kb (12MB) and went back to the topic.

Now all of the images instead bear the message **(image larger than 12288KB)** despite only one being \>12MB.

Steps to repro:

- Link a large image which exceeds limit
- Wait until file sizes are checked and local download attempted
- Raise limit
- Revisit post

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 28, 2020, 11:13pm UTC](https://meta.discourse.org/t/misleading-message-when-image-size-limit-changed/139971/2 "2020-01-28T23:13:01Z")

</div>

Wait so a rebake fixes this? The feature request is to force a rebake on all the posts with images if you fiddle with the setting?

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [January 28, 2020, 11:18pm UTC](https://meta.discourse.org/t/misleading-message-when-image-size-limit-changed/139971/3 "2020-01-28T23:18:21Z")

</div>

I couldn’t wait for a rebake as the embedded images had turned into links and people needed to see the imagery. I can retest later to see if it’s the case.

The bug is that the error message reflects the file size, even if the file isn’t larger than the new specified value. I get bringing the value into the message, but it’s not helpful if it’s not accurate.

Rebuild HTML definitely didn’t work.

In the end I threw a garbage querystring on the back of the image URLs so that they would be considered different and be checked again.

---

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [February 24, 2020, 9:11pm UTC](https://meta.discourse.org/t/misleading-message-when-image-size-limit-changed/139971/4 "2020-02-24T21:11:12Z")

</div>

I’m also facing this issue. A rebake doesn’t work, the `image larger than` message is shown even if the image is not larger than the limit.

Is there any workaround that can be applied in batch? I assume there’s a file size cache, any way to purge it?

**EDIT** : Solved in my instance deleting the _`large_images`_ array from all posts’ _`custom_fields`_ via Rails console

Thanks.

---

<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: [February 24, 2020, 11:27pm UTC](https://meta.discourse.org/t/misleading-message-when-image-size-limit-changed/139971/5 "2020-02-24T23:27:23Z")

</div>


