Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Auto height iFrames on

iFrames that resize based on the content of the page is possible for In order to get them working, you will need to include a snippet of JS on the page that will be iframed. The code for this is:

    window.iFrameResizer = {
    targetOrigin: ''
<script src=""></script>

Drop this code into the <head> of your HTML document. In Drupal, select Auto when adding the iFrame component.

If you have any issues, send an email to Make sure to include the URL of the page you're adding the component to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment