# Is it possible to have an embed auto size to content?

**URL:** <https://community.weweb.io/t/is-it-possible-to-have-an-embed-auto-size-to-content/15400>\
**Category:** Ask us anything\
**Created:** [January 14, 2025, 6:15pm UTC](https://community.weweb.io/t/is-it-possible-to-have-an-embed-auto-size-to-content/15400 "2025-01-14T18:15:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oli](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/oli/32/8397_2.png) [@oli](https://community.weweb.io/u/oli)\
**Post date:** [January 14, 2025, 6:15pm UTC](https://community.weweb.io/t/is-it-possible-to-have-an-embed-auto-size-to-content/15400/1 "2025-01-14T18:15:24Z")

</div>

Hey folks, I’m using an embed to display dynamic data. I cannot figure out how to make the height of the embed block dynamically match the content.

So for instance, I’ll have a loom video appearing on one page, and a tally form appear on the other. I can’t get the embed height to automatically match both of them, which means the tally form has a scrollbar and it’s easy to miss the “Submit” button. The data within the field is just a basic link to the video / form, with no additional embed code.

Any help appreciated, I’ve played around a lot trying to make it work!

---

<div class="post-metadata">

**Author:** ![antoine\_caron](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@antoine\_caron](https://community.weweb.io/u/antoine_caron)\
**Post date:** [January 17, 2025, 1:37pm UTC](https://community.weweb.io/t/is-it-possible-to-have-an-embed-auto-size-to-content/15400/2 "2025-01-17T13:37:21Z")

</div>

Could you share a screenshot?

---

<div class="post-metadata">

**Author:** ![oli](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/oli/32/8397_2.png) [@oli](https://community.weweb.io/u/oli)\
**Post date:** [January 21, 2025, 9:56am UTC](https://community.weweb.io/t/is-it-possible-to-have-an-embed-auto-size-to-content/15400/3 "2025-01-21T09:56:54Z")

</div>

Absolutely -

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/6/688793e8712cf36c0bb80cf4dbedc5a832cac2d3.jpeg)

What we’re looking at here is a collection that is displaying a list of embeds, which are uploaded by users. There are two items visible - a video made in Loom, and a form made in Tally.

Right now, I can’t get WeWeb to understand the height of the individual items - so I can set the height to be non dynamic to work for the Loom, but then you can see the Tally is cut off and the user has to scroll. Or I can make the height fit the Tally, but then there’s loads of space after the Loom.

- The embeds are just the link, eg [loom.com/23492340](http://loom.com/23492340), they don’t include any of the iframe information (eg height etc.)
- I’ve tried pretty much every setting when it comes to adjusting the height automatically to the content, but it feels like WeWeb can’t find the height of the original item.
- One thought I had was simply to get the users to add something like “&height=100” to the URL of the embed and extract that as the height, or similar. But haven’t tested that yet.

Any suggestions or workarounds appreciated!

---

<div class="post-metadata">

**Author:** ![antoine\_caron](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@antoine\_caron](https://community.weweb.io/u/antoine_caron)\
**Post date:** [January 21, 2025, 10:25am UTC](https://community.weweb.io/t/is-it-possible-to-have-an-embed-auto-size-to-content/15400/4 "2025-01-21T10:25:07Z")

</div>

Are you just looking to apply a proper height to the iFrame video component ? Or is there another problem (i tried reproducing it quickly) Have you tried just appliying the width you wanted and the height to ratio & ratio to 16:9 ? Seems to work fine on my side but may be i didn’t get the whole problem.

---

<div class="post-metadata">

**Author:** ![oli](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/oli/32/8397_2.png) [@oli](https://community.weweb.io/u/oli)\
**Post date:** [January 22, 2025, 12:39pm UTC](https://community.weweb.io/t/is-it-possible-to-have-an-embed-auto-size-to-content/15400/5 "2025-01-22T12:39:43Z")

</div>

I want the iframe height to be based off the height of the item that is being embedded. EG for a video, it should be about 400px (16:9 ratio, as you say), but then when I embed a form which is a lot longer it should automatically scale the height of the embed object to match the form, rather than expecting a user to scroll.

Right now I can get the embed to match the height of one or the other, but not both ☹
