# Image Resizing - Desktop vs Mobile Differences

**URL:** https://meta.discourse.org/t/image-resizing-desktop-vs-mobile-differences/269921
**Category:** UX
**Created:** [June 28, 2023, 4:44pm UTC](https://meta.discourse.org/t/image-resizing-desktop-vs-mobile-differences/269921 "2023-06-28T16:44:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Octoberon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/octoberon/32/288382_2.png) [@Octoberon](https://meta.discourse.org/u/Octoberon)
#### Post date: [June 28, 2023, 4:44pm UTC](https://meta.discourse.org/t/image-resizing-desktop-vs-mobile-differences/269921/1 "2023-06-28T16:44:17Z")

</div>

I’ve been taking a closer look at how Discourse deals with image uploads. I think I have a reasonable grasp of the relvevant settings now. While experimenting with a 3MB image with a resolution of 4032x3024 I noticed that uploading via a computer resulted in an image downsized to 1920x1440 but when I uploaded the same photo from the Photos app on an iPhone it was stored the image at 4032x3024.

Why is there a difference between the desktop and mobile uploads?

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [June 28, 2023, 4:48pm UTC](https://meta.discourse.org/t/image-resizing-desktop-vs-mobile-differences/269921/2 "2023-06-28T16:48:16Z")

</div>

i think this is discussed here

> [@Srcset attribute may load larger images on mobile than desktop](https://meta.discourse.org/t/srcset-attribute-may-load-larger-images-on-mobile-than-desktop/264039/11):
>
> I may be wrong, but I think it makes sense. If you look at the HTML srcset, the following images are served based on the device pixel ratio (x1, x1,5, x2). https://...2f50d4ad9f5f865b783b02d392de75bdceec01da\_2\_690x460.jpeg, https://...2f50d4ad9f5f865b783b02d392de75bdceec01da\_2\_1035x690.jpeg 1.5x, https://...2f50d4ad9f5f865b783b02d392de75bdceec01da\_2\_1380x920.jpeg 2x Usually, mobile has an x2 ratio (or more) because they have a higher pixel density. So you would want to serve images with hig…

---

<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 28, 2023, 5:01pm UTC](https://meta.discourse.org/t/image-resizing-desktop-vs-mobile-differences/269921/3 "2023-06-28T17:01:39Z")

</div>

> [@Octoberon](#):
>
> While experimenting with a 3MB image with a resolution of 4032x3024 I noticed that uploading via a computer resulted in an image downsized to 1920x1440 but when I uploaded the same photo from the Photos app on an iPhone it was stored the image at 4032x3024.

When Discourse detects a large enough image it triggers [Client side image optimization enabled by default](https://meta.discourse.org/t/client-side-image-optimization-enabled-by-default/197617) to optimize the image on the user device before uploading it.

This works on every device, be it mobile or desktop, except for Apple mobile devices were a series of bugs in the only browser engine allowed made we disable this feature there.

---

<div class="post-metadata">

### Author: ![Octoberon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/octoberon/32/288382_2.png) [@Octoberon](https://meta.discourse.org/u/Octoberon)
#### Post date: [June 28, 2023, 5:17pm UTC](https://meta.discourse.org/t/image-resizing-desktop-vs-mobile-differences/269921/4 "2023-06-28T17:17:27Z")

</div>

Thanks for the speedy explanations. I’d made some progress towards understanding what is going on with the client-side optimisation but the blog post has brought it together. Every day is a school day.
