---
updatedAt: 2025-05-21T20:29:27.000Z
agentTools:
  projectIndex: https://docs.embed.ly/llms.txt
---

# Provider Height Resizing

Embedly allows providers to set the height of the embed through JavaScript. This is useful if your Embed has a fixed height or does not predictably resize with default responsive sizing.

Right now this only works for customers that use Native embeds like [Medium](https://medium.com) and [Embedly's cards](http://embed.ly/cards).

[Native](https://docs.embed.ly/docs/native)

> 👍 Please read how Native Embeds work!
>
> You can read about Native Embeds [here](https://docs.embed.ly/docs/native)

If you are a provider all you need to do is send the height via postMessage like so:

```javascript
window.parent.postMessage(JSON.stringify({ 
	src: window.location.toString(), 
	context: 'iframe.resize', 
	height: 300 // pixels
}), '*')
```

So as an example, for a fixed height embed you can use the following.

```javascript
window.addEventListener('resize', function(){
	window.parent.postMessage(JSON.stringify({ 
    src: window.location.toString(), 
    context: 'iframe.resize', 
    height: 300 // pixels
  }), '*')
})
```

Please make sure you stringify the object before you send it up via postMessage, if you don't the code will not work.