Skip to content

Instantly share code, notes, and snippets.

Created September 21, 2016 14:14
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
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