Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

iFrame Resizer

Security covered Maintenance fixes only 665 sites

Part of the Iframe ecosystem · 7 projects

This module integrates the iFrame Resizer JavaScript library to automatically adjust the size of embedded iframes to fit their content, eliminating scrollbars. This ensures a seamless viewing experience for content framed within your Drupal site, whether your site is hosting the iframes or being hosted within one.

Introduction

This module makes the iFrame Resizer javascript library available on your Drupal site. With it enabled, you can "keep same and cross domain iFrames sized to their content with support for window/content resizing, in page links, nesting and multiple iFrames."

In other words, if you're sick of seeing scrollbars on content iFramed into your site, this module will help you by dynamically resizing iFrames so that no scrollbars are present.

See the library's homepage for information on its capabilities: http://davidjbradshaw.github.io/iframe-resizer/

Requirements

This module requires the iFrame Resizer javascript library to be installed in Drupal's "libraries" directory.

Important Note: The 5.x library version is not supported as it requires a commercial license for commercial environments. Please use version 4.x.

To install the required library via composer (recommended):

  1. Enable usage of third-party libraries using composer, see here for an explanation.
  2. Run composer require bower-asset/iframe-resizer:^4

Installation

  1. Download the library or install via Composer (see Requirements above).
  2. If installing manually, unpack and rename the resulting directory "iframe-resizer" and place it in your Drupal installation's "libraries" directory.
  3. Install as you would normally install a contributed Drupal module. See: https://drupal.org/documentation/install/modules-themes/modules-7 for further information.
  4. If your site will be hosting resizable iFrames, the page your site will be iFraming in must include the content window file from the iFrame Resizer library (i.e. The iFramed page must contain the js/iframeResizer.contentWindow.js or js/iframeResizer.contentWindow.min.js file), and the 'This site will host resizable iFrames.' checkbox must be checked on your site's configuration page (admin/config/user-interface/iframe_resizer).
  5. If your site will be hosted within a resizable iFrame, the page hosting your site must include the main file from the iFrame Resizer library (i.e. The page iFraming in your site must contain the js/iframeResizer.js or js/iframeResizer.min.js file), and the 'Pages from this site will be hosted within iFrames that have been made resizable by the iFrame Resizer JavaScript library.' checkbox must be checked on your site's configuration page (admin/config/user-interface/iframe_resizer).

Configuration

  • Configure user permissions in Administration » People » Permissions:

    • Administer the iFrame Resizer module Users in roles with the "Administer the iFrame Resizer module" permission will be able to configure the behavior of the iFrame Resizer module.
  • Customize the module settings in Administration » Configuration » User interface » iFrame Resizer:

    • The iFrame Resizer Usage fieldset At least one of the checkboxes in this fieldset should be checked, otherwise the module won't do anything.

    • The Advanced Options for Hosting Resizable iFrames fieldset This fieldset will appear if the 'This site will host resizable iFrames.' checkbox is checked. It will allow you to override the library's default behavior.

    • The Advanced Options for Hosted Resizable iFrames fieldset This fieldset will appear if the 'Pages from this site will be hosted within iFrames that have been made resizable by the iFrame Resizer JavaScript library.' checkbox is checked. It will allow you to override the library's default behavior.

Drupal 10–11

Ask your assistant about iFrame Resizer

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
9
Tracked since
Mar 2023
Latest release
8 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.0.6 Stable 10–11 Feb 11, 2026
2.0.5 Stable 10–11 Feb 10, 2026
2.0.4 Stable 9–11 Aug 22, 2024
2.0.3 Stable 8–10 Jan 30, 2024
2.0.2 Stable 8–10 Mar 15, 2023
2.0.1 Stable 8–10 Mar 3, 2023
2.0.0 Stable 8–9 Mar 3, 2023
8.x-1.2 Stable Mar 3, 2023
2.x-dev Dev 10–11 Mar 3, 2023