# Sizing images and cloudinary support

**URL:** <https://meta.discourse.org/t/sizing-images-and-cloudinary-support/15756>\
**Category:** Feature\
**Created:** [May 18, 2014, 5:58pm UTC](https://meta.discourse.org/t/sizing-images-and-cloudinary-support/15756 "2014-05-18T17:58:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![justin\_gordon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin_gordon/32/105029_2.png) [@justin\_gordon](https://meta.discourse.org/u/justin_gordon)\
**Post date:** [May 18, 2014, 5:58pm UTC](https://meta.discourse.org/t/sizing-images-and-cloudinary-support/15756/1 "2014-05-18T17:58:17Z")

</div>

It’s awesome that we can drag & drop images. @codinghorror, Any thoughts on these ideas?

1. If you make your images big, that’s great because you can click and expand. However, what if you want to have a post with 15 2048x2048 images. That could be a bit slow to load.

2. If you want to upload from an iPhone 5, it requires too much extra work to resize the image on the phone.

3. Ideally, when uploading images, an optimized smaller size would be created for the topic/post view, and clicking an image would bring up a slide show view of the appropriate size.

It seems like we might be able to use [cloudinary.com](http://cloudinary.com), or maybe integrate image magic:

[https://github.com/rmagick/rmagick](https://github.com/rmagick/rmagick)

Has anybody looked into integrating either of these?

---

<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:** [May 18, 2014, 6:31pm UTC](https://meta.discourse.org/t/sizing-images-and-cloudinary-support/15756/2 "2014-05-18T18:31:39Z")

</div>

This automatic resizing/thumbnailing you are talking about already happens with all images, no matter how they are added to a topic (drag and drop, email attachment, upload button, paste). So I am not sure what you mean here?

---

<div class="post-metadata">

**Author:** ![justin\_gordon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin_gordon/32/105029_2.png) [@justin\_gordon](https://meta.discourse.org/u/justin_gordon)\
**Post date:** [May 18, 2014, 6:49pm UTC](https://meta.discourse.org/t/sizing-images-and-cloudinary-support/15756/3 "2014-05-18T18:49:33Z")

</div>

That’s brilliant! I didn’t realize it. Good to know.

However, uploading from an iPhone requires resizing the image first.

Would you recommend making the max image size larger to accommodate direct iPhone uploads? Guessing that we don’t want directly uploads from my 24 megapixel SLR. However, it would be good know the pros/cons of just accepting any image size.

I guess what would be awesome would be for help links (question icons) next to each setting, and maybe they could link to a topic on the meta site for notes like this.

---

<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:** [May 18, 2014, 6:56pm UTC](https://meta.discourse.org/t/sizing-images-and-cloudinary-support/15756/4 "2014-05-18T18:56:46Z")

</div>

There is a maximum upload size to prevent griefing / crashing the server, it defaults to 2 megabytes. You can change that on your install to whatever you want via the site settings.

Otherwise I could just access your Discourse, upload a very large 1 gigabyte image (or a couple of them) and destroy it..

---

<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:** [May 18, 2014, 9:41pm UTC](https://meta.discourse.org/t/sizing-images-and-cloudinary-support/15756/5 "2014-05-18T21:41:17Z")

</div>

> [@codinghorror](#):
>
> whatever you want via the site settings.

Are we sure about that [discourse/config/nginx.sample.conf at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/config/nginx.sample.conf#L41)

```plaintext
  # maximum file upload size (keep up to date when changing the corresponding site setting)
  client_max_body_size 2m;

```

You would need to add a hook to replace that in nginx to your template

---

<div class="post-metadata">

**Author:** ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)\
**Post date:** [December 4, 2025, 11:14am UTC](https://meta.discourse.org/t/sizing-images-and-cloudinary-support/15756/6 "2025-12-04T11:14:24Z")

</div>


