# Image resizing question

**URL:** https://meta.discourse.org/t/image-resizing-question/230373
**Category:** Support
**Tags:** uploads
**Created:** [June 18, 2022, 2:36pm UTC](https://meta.discourse.org/t/image-resizing-question/230373 "2022-06-18T14:36:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [June 18, 2022, 2:36pm UTC](https://meta.discourse.org/t/image-resizing-question/230373/1 "2022-06-18T14:36:29Z")

</div>

Hi,

On a forum I work on, the Files settings are the default ones, except for these:

 ![image](https://global.discourse-cdn.com/meta/original/4X/f/7/e/f7e4ec04ae7916da9f7982d9374d46f64eca5fab.png)

Notably, these settings weren’t changed:

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/1/9/51932b249a0487cf0449965d162c878ce0c731d0.png)

In this message, all uploaded pictures but the first one have very large dimensions (probably haven’t been resized):

> **[Combinox 66 + samba 57+ salsa 75](https://vw-camper.fr/t/combinox-66-samba-57-salsa-75/10848/3458?u=canapin)**
>
> Photo de famille, Chercher l’intruse ? 1993, pas assez vieux pour moi. J’ai tout remis au hangar, et je vais m’occuper de la grand mère Je l’ai poussé jusqu’a chez moi, histoire de lui mettre un coup de karcher Elle a vraiment une...

![image](https://global.discourse-cdn.com/meta/original/4X/c/d/9/cd9b0b2ddb7b576f6491bfa625574e37702811d1.png)

The file size is OK, \< 4 MB as it should be, but when I try to upload similar resolution pictures from my computer or my smartphone, they’re all resized to 1920×1440 or 1920×1080 px whether the originals are more or less than 4 MB.

So, how the pictures in the linked post weren’t resized to 1920px width? 🤔

Note: the forum uses 2.9.0.beta4.

Looking at the 2.0.5.beta5 changelog, could it be related to one of these bugs fixes?

- Allows image to be displayed at the right size
- Ensure post\_hotlinked\_media index does not exceed size limit
- Ensure ‘crop’ always returns requested dimensions

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [June 18, 2022, 2:47pm UTC](https://meta.discourse.org/t/image-resizing-question/230373/2 "2022-06-18T14:47:13Z")

</div>

> [@Canapin](#):
>
> So, how the pictures in the linked post weren’t resized to 1920px width? 🤔

If you look closely you will see that the first one on the post was resized and compressed just fine but the following ones weren’t. The client side image optimization happens on a best effort, if it fails it passes the original images back to the server.

I’ve seen this behavior of failing to compress images after the first one on iOS devices where memory pressure is high. Not much we can do IMO.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [June 18, 2022, 2:50pm UTC](https://meta.discourse.org/t/image-resizing-question/230373/3 "2022-06-18T14:50:28Z")

</div>

> [@Falco](#):
>
> I’ve seen this behavior of failing to compress images after the first one on iOS devices where memory pressure is high.

Good to know!

Thank you for this probable explanation.

Just to know, is there a rake task or a rails command that could trigger a resize on images that are larger than the site setting (1920 width, 1920 height)?

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [July 18, 2022, 2:51pm UTC](https://meta.discourse.org/t/image-resizing-question/230373/4 "2022-07-18T14:51:02Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
