# Markdown … limiting the width of an image

**URL:** <https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655>\
**Category:** Elements\
**Created:** [October 11, 2025, 9:40am UTC](https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655 "2025-10-11T09:40:42Z")\
**Posts on this page:** 15\
**Page:** 3

<div class="post-metadata">

**Author:** ![upssjw](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/upssjw/32/26063_2.png) [@upssjw](https://forums.realmacsoftware.com/u/upssjw)\
**Post date:** [October 12, 2025, 7:59pm UTC](https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655/41 "2025-10-12T19:59:02Z")

</div>

```auto
<img src="https://www.w3schools.com/w3images/lights.jpg" alt="Alt text" style="width: 500px; height: auto; max-width: 100%;" />

```

incase you need external address example

---

<div class="post-metadata">

**Author:** ![upssjw](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/upssjw/32/26063_2.png) [@upssjw](https://forums.realmacsoftware.com/u/upssjw)\
**Post date:** [October 12, 2025, 8:00pm UTC](https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655/42 "2025-10-12T20:00:33Z")

</div>

Not tried publishing this so no idea if it will work

---

<div class="post-metadata">

**Author:** ![upssjw](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/upssjw/32/26063_2.png) [@upssjw](https://forums.realmacsoftware.com/u/upssjw)\
**Post date:** [October 12, 2025, 9:02pm UTC](https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655/43 "2025-10-12T21:02:52Z")

</div>

@jbob dont think this works, I tried and it cannot find the images

---

<div class="post-metadata">

**Author:** ![jbob](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/jbob/32/31581_2.png) [@jbob](https://forums.realmacsoftware.com/u/jbob)\
**Post date:** [October 12, 2025, 9:10pm UTC](https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655/44 "2025-10-12T21:10:00Z")

</div>

Thanks Steve - I got your first example to work … will take another look tomorrow. Cooked now. Night and thanks again for all your input !!

---

<div class="post-metadata">

**Author:** ![upssjw](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/upssjw/32/26063_2.png) [@upssjw](https://forums.realmacsoftware.com/u/upssjw)\
**Post date:** [October 13, 2025, 6:11am UTC](https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655/45 "2025-10-13T06:11:15Z")

</div>

if I use the full address to the image it works, not used markdown before except the bit I have tried with Elements, so may not understand the path

---

<div class="post-metadata">

**Author:** ![jbob](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/jbob/32/31581_2.png) [@jbob](https://forums.realmacsoftware.com/u/jbob)\
**Post date:** [October 13, 2025, 7:51am UTC](https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655/46 "2025-10-13T07:51:37Z")

</div>

> [@upssjw](#):
>
> ```auto
> <script src="https://cdn.tailwindcss.com"></script>
> <img 
> src="/resources/blog/highland.jpg" 
> alt="Alt text"
> class="w-[320px] sm:w-[500px] h-auto"/>
> 
> ```

OK - will have a play with that.

Perhaps when using html within markdown, one must specify the full url ?

Still hoping for a markdown version of max image xx px

Otherwise it feels like a kludge

Thanks again

Jol

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [October 13, 2025, 9:18am UTC](https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655/47 "2025-10-13T09:18:57Z")

</div>

You can include raw HTML inside your Markdown file if you prefer, but when you do that, you’ll need to use the **absolute path** to your image.

Also, **don’t link to an external Tailwind CDN** , especially the _development-only_ version shown in your snippet. Elements already includes Tailwind automatically, so you never need to add it yourself.

If you want to control the image size directly, you can use Tailwind’s **arbitrary value syntax** i.e. `[&_img]:w-[320px]`. It’s a bit harder to read, but perfectly valid. For example:

```auto
<img src="/resources/blog/highland.jpg" clt="Alt text" class="[&_img]:w-[320px] sm:[&_img]:w-full h-auto"/>

```

Hope that points you in the right direction 🙂

---

<div class="post-metadata">

**Author:** ![upssjw](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/upssjw/32/26063_2.png) [@upssjw](https://forums.realmacsoftware.com/u/upssjw)\
**Post date:** [October 13, 2025, 9:42am UTC](https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655/48 "2025-10-13T09:42:19Z")

</div>

@dan not that I know much about markdown, if I dont include the cdn I cannot get tailwind to work

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [October 13, 2025, 9:47am UTC](https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655/49 "2025-10-13T09:47:32Z")

</div>

Elements will only include classes for Tailwind that is on the page at export. The CMS is a separate system.

Tailwind classes used in Markdown (or code files) will not be included as Elements doesn’t process those.

A better explanation on how this works (and the workaround), is available here:

> **[Troubleshooting | RapidWeaver Elements Docs](https://docs.realmacsoftware.com/elements-docs/elements-language/getting-started/troubleshooting#dynamic-php-code-and-tailwind-classes-generation)**
>
> Common issues solved

---

<div class="post-metadata">

**Author:** ![upssjw](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/upssjw/32/26063_2.png) [@upssjw](https://forums.realmacsoftware.com/u/upssjw)\
**Post date:** [October 13, 2025, 9:57am UTC](https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655/50 "2025-10-13T09:57:19Z")

</div>

so best to use css? in markdown

---

<div class="post-metadata">

**Author:** ![jbob](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/jbob/32/31581_2.png) [@jbob](https://forums.realmacsoftware.com/u/jbob)\
**Post date:** [October 13, 2025, 10:23am UTC](https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655/51 "2025-10-13T10:23:59Z")

</div>

My conclusion is that Markdown is manageable if you just have text … but quite hard work if you have text interspaced with lots of images and links.

So I’m wondering if it’s possible to set up a more complex blog post template in the following format : bodytext1, image1, caption1, bodytext2, image2, caption2, bodytext3, image3, caption3, bodytext4, image4, caption4 etc.

Could you see this working Dan, Ben ?

I’d get a lot more control over my layout … and the markup would be just text as I think it was intended

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [October 13, 2025, 11:02am UTC](https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655/52 "2025-10-13T11:02:43Z")

</div>

Yes, this is one of the main drawbacks for Markdown.

You could certainly try breaking up your content to give yourself a little more control. Why not do a trial and see how it goes…

---

<div class="post-metadata">

**Author:** ![thominator](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/thominator/32/35233_2.png) [@thominator](https://forums.realmacsoftware.com/u/thominator)\
**Post date:** [October 13, 2025, 12:27pm UTC](https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655/53 "2025-10-13T12:27:14Z")

</div>

And this has been my point for over a year: Elements does _not_ really have a solution for “articles” and nothing that matches the old Styled Text of RWC. This is clearly a stumbling block for quite a few of us.

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [October 13, 2025, 12:31pm UTC](https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655/54 "2025-10-13T12:31:24Z")

</div>



---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [October 13, 2025, 12:31pm UTC](https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655/55 "2025-10-13T12:31:58Z")

</div>

Closing this thread as it’s got too long and off topic, multiple times.

[Previous page](https://forums.realmacsoftware.com/t/markdown-limiting-the-width-of-an-image/51655.md?page=2)
