# Help with HTML Custom code for image

**URL:** <https://forums.realmacsoftware.com/t/help-with-html-custom-code-for-image/56891>\
**Category:** Elements\
**Created:** [July 2, 2026, 5:19pm UTC](https://forums.realmacsoftware.com/t/help-with-html-custom-code-for-image/56891 "2026-07-02T17:19:56Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![PMUK](https://avatars.discourse-cdn.com/v4/letter/p/7993a0/32.png) [@PMUK](https://forums.realmacsoftware.com/u/PMUK)\
**Post date:** [July 2, 2026, 5:19pm UTC](https://forums.realmacsoftware.com/t/help-with-html-custom-code-for-image/56891/1 "2026-07-02T17:19:56Z")

</div>

Oh no my bot has gone, it’s been a while but I am writing a HTML custom component and forgot how to get an image up. my image is in “resources/curtains/pig.png” I have the code below but getting a “?” mark and no image any help gratefully received.

```auto
<img id="pig" src="resources/curtains/pig.png" alt="Pig">

```

---

<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:** [July 2, 2026, 8:40pm UTC](https://forums.realmacsoftware.com/t/help-with-html-custom-code-for-image/56891/2 "2026-07-02T20:40:47Z")

</div>

/curtains/pig.png, not /resources/curtains…

---

<div class="post-metadata">

**Author:** ![PMUK](https://avatars.discourse-cdn.com/v4/letter/p/7993a0/32.png) [@PMUK](https://forums.realmacsoftware.com/u/PMUK)\
**Post date:** [July 2, 2026, 9:06pm UTC](https://forums.realmacsoftware.com/t/help-with-html-custom-code-for-image/56891/3 "2026-07-02T21:06:16Z")

</div>

Thanks will try tomorrow.

---

<div class="post-metadata">

**Author:** ![PMUK](https://avatars.discourse-cdn.com/v4/letter/p/7993a0/32.png) [@PMUK](https://forums.realmacsoftware.com/u/PMUK)\
**Post date:** [July 3, 2026, 9:07am UTC](https://forums.realmacsoftware.com/t/help-with-html-custom-code-for-image/56891/4 "2026-07-03T09:07:01Z")

</div>

Thom I tried this and it didn’t work - also with ? and . so my non working code is:

\<img

```
    <img src="/curtains/pig.png" alt="Pig">

    class="absolute inset-0 w-full h-full object-contain"

>

```

---

<div class="post-metadata">

**Author:** ![annebourdon](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/annebourdon/32/2391_2.png) [@annebourdon](https://forums.realmacsoftware.com/u/annebourdon)\
**Post date:** [July 3, 2026, 9:19am UTC](https://forums.realmacsoftware.com/t/help-with-html-custom-code-for-image/56891/5 "2026-07-03T09:19:42Z")

</div>

try `<img src="/curtains/pig.png" alt="Pig" class="absolute inset-0 w-full h-full object-contain"/>`

or `<img src="/curtains/pig.png" alt="Pig" class="absolute inset-0 w-full h-full object-contain">`  
without the last /

---

<div class="post-metadata">

**Author:** ![PMUK](https://avatars.discourse-cdn.com/v4/letter/p/7993a0/32.png) [@PMUK](https://forums.realmacsoftware.com/u/PMUK)\
**Post date:** [July 3, 2026, 10:11am UTC](https://forums.realmacsoftware.com/t/help-with-html-custom-code-for-image/56891/6 "2026-07-03T10:11:10Z")

</div>

> [@annebourdon](#):
>
> `<img src="/curtains/pig.png" alt="Pig" class="absolute inset-0 w-full h-full object-contain">`

THANKS tried both just get a “?” mark, I have tried this before and it worked - I dragged the image into code to get path the remove resources but for some unknown reason (to me) this one doesn’t work. I have tried it with another .png and that didnt work either.

---

<div class="post-metadata">

**Author:** ![annebourdon](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/annebourdon/32/2391_2.png) [@annebourdon](https://forums.realmacsoftware.com/u/annebourdon)\
**Post date:** [July 3, 2026, 10:13am UTC](https://forums.realmacsoftware.com/t/help-with-html-custom-code-for-image/56891/7 "2026-07-03T10:13:54Z")

</div>

Hi,  
Is “pig.png” all in lower case in your resources folder ?

---

<div class="post-metadata">

**Author:** ![PMUK](https://avatars.discourse-cdn.com/v4/letter/p/7993a0/32.png) [@PMUK](https://forums.realmacsoftware.com/u/PMUK)\
**Post date:** [July 3, 2026, 10:14am UTC](https://forums.realmacsoftware.com/t/help-with-html-custom-code-for-image/56891/8 "2026-07-03T10:14:41Z")

</div>

![Screenshot 2026-07-03 at 10.58.49](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/9/9/999e1683661a734bb0b3dfbc4083c2dc49ce1b51.png)

Yes as always

---

<div class="post-metadata">

**Author:** ![annebourdon](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/annebourdon/32/2391_2.png) [@annebourdon](https://forums.realmacsoftware.com/u/annebourdon)\
**Post date:** [July 3, 2026, 10:16am UTC](https://forums.realmacsoftware.com/t/help-with-html-custom-code-for-image/56891/9 "2026-07-03T10:16:10Z")

</div>

Is it possible to have the page URL where this occurs ?

---

<div class="post-metadata">

**Author:** ![PMUK](https://avatars.discourse-cdn.com/v4/letter/p/7993a0/32.png) [@PMUK](https://forums.realmacsoftware.com/u/PMUK)\
**Post date:** [July 3, 2026, 10:17am UTC](https://forums.realmacsoftware.com/t/help-with-html-custom-code-for-image/56891/10 "2026-07-03T10:17:22Z")

</div>

I have only just started this for someone who owns a Lego Store. I have just purchased the domain names and waiting to transfer them so they are anywhere at moment so can’t help.

---

<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:** [July 3, 2026, 11:07am UTC](https://forums.realmacsoftware.com/t/help-with-html-custom-code-for-image/56891/11 "2026-07-03T11:07:34Z")

</div>

@PMUK

just your code

```auto
<img src="/resources/curtains/pig.png" alt="Pig" class="w-full h-full object-contain">

```

---

<div class="post-metadata">

**Author:** ![PMUK](https://avatars.discourse-cdn.com/v4/letter/p/7993a0/32.png) [@PMUK](https://forums.realmacsoftware.com/u/PMUK)\
**Post date:** [July 3, 2026, 11:17am UTC](https://forums.realmacsoftware.com/t/help-with-html-custom-code-for-image/56891/12 "2026-07-03T11:17:15Z")

</div>

> [@upssjw](#):
>
> `<img src="/resources/curtains/pig.png" alt="Pig" class="w-full h-full object-contain">`

Steve once again indebted, I think the heat and humidity has damaged my brain - even more! Have a great weekend!
