# HTML Responsive Images

**URL:** <https://meta.discourse.org/t/html-responsive-images/145400>\
**Category:** Support\
**Created:** [March 24, 2020, 2:08pm UTC](https://meta.discourse.org/t/html-responsive-images/145400 "2020-03-24T14:08:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rebal15](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@rebal15](https://meta.discourse.org/u/rebal15)\
**Post date:** [March 24, 2020, 2:08pm UTC](https://meta.discourse.org/t/html-responsive-images/145400/1 "2020-03-24T14:08:25Z")

</div>

Hi there, I am new to HTML, however not to discourse.

Does anybody know how I would make an image responsive (change size depending on screen size). I’d like to add an image to a thread, and make it responsive.

---

<div class="post-metadata">

**Author:** ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)\
**Post date:** [March 24, 2020, 4:10pm UTC](https://meta.discourse.org/t/html-responsive-images/145400/2 "2020-03-24T16:10:57Z")

</div>

Hey, welcome to Meta 👋

> [@rebal15](#):
>
> I’d like to add an image to a thread, and make it responsive.

This should already work, On desktop, the maximum width for a post is about 700px. The maximum width for images is set by the `max_image_width` site setting. It defaults to 690px - to account for some padding. It is very unlikely for anyone to run a desktop browser window smaller than 700px.

On mobile, we give images a width based on the size of the screen. So, images will always fit not matter what phone you use.

You can see how all of this works here

[discourse/app/assets/javascripts/discourse/widgets/post-cooked.js at c61ebc9ba67d6588c09c2b93205865e0fd388f51 · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/c61ebc9ba67d6588c09c2b93205865e0fd388f51/app/assets/javascripts/discourse/widgets/post-cooked.js#L66-L93)

---

<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:** [March 27, 2024, 2:48pm UTC](https://meta.discourse.org/t/html-responsive-images/145400/3 "2024-03-27T14:48:05Z")

</div>


