# Set image width using relative units?

**URL:** <https://forums.realmacsoftware.com/t/set-image-width-using-relative-units/44378>\
**Category:** RapidWeaver Elements\
**Created:** [August 22, 2024, 3:00pm UTC](https://forums.realmacsoftware.com/t/set-image-width-using-relative-units/44378 "2024-08-22T15:00:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon68150607](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@anon68150607](https://forums.realmacsoftware.com/u/anon68150607)\
**Post date:** [August 22, 2024, 3:00pm UTC](https://forums.realmacsoftware.com/t/set-image-width-using-relative-units/44378/1 "2024-08-22T15:00:48Z")

</div>

Why can’t the **display size** of an Image element be set to anything other than pixels? There are times where it’s useful to be able to specify dimensions in relative units (em, rem, vw/vh and %), and that is currently impossible in Elements.

Of course you should specify the `width` and `height` of an `<img>` tag using the actual pixels dimensions (ie. `<img src="img.png" width="200" height="200"/>`, but when it comes to actually displaying the images on a page, pixels are not always the best choice.

**Edit:** I just noticed that the Custom field in the Display Size property currently does nothing.

---

<div class="post-metadata">

**Author:** ![handshaper](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/handshaper/32/27373_2.png) [@handshaper](https://forums.realmacsoftware.com/u/handshaper)\
**Post date:** [August 22, 2024, 6:21pm UTC](https://forums.realmacsoftware.com/t/set-image-width-using-relative-units/44378/2 "2024-08-22T18:21:50Z")

</div>

Image size behavior is weird at best. I have noticed that setting the DISPLAY size does nothing unless you also set the FILE size, at least with the SVG images I have been using. This seems very odd why have a display size if it does nothing without a FILE size?

---

<div class="post-metadata">

**Author:** ![ben](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ben/32/28488_2.png) [@ben](https://forums.realmacsoftware.com/u/ben)\
**Post date:** [August 23, 2024, 2:32pm UTC](https://forums.realmacsoftware.com/t/set-image-width-using-relative-units/44378/3 "2024-08-23T14:32:53Z")

</div>

> [@handshaper](#):
>
> why have a display size if it does nothing without a FILE size?

Sounds like a bug, we’ll look in to this!

---

<div class="post-metadata">

**Author:** ![ben](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ben/32/28488_2.png) [@ben](https://forums.realmacsoftware.com/u/ben)\
**Post date:** [August 23, 2024, 2:36pm UTC](https://forums.realmacsoftware.com/t/set-image-width-using-relative-units/44378/4 "2024-08-23T14:36:01Z")

</div>

> [@anon68150607](#):
>
> Why can’t the **display size** of an Image element be set to anything other than pixels?

we have plans to add other ways to let you set values in an valid CSS value, so for now we are holding off updating the Image element sizing.

We’ll either add a nicer way to set CSS values (such as px, em, rem, vh, vw, etc, etc.) or at least improve the Image element to accept other values, so hang tight - we’re aware we need to improve this!
