davidjbradshaw/iframe-resizer

Keep iframes sized to their content

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 51 seconds ago
Added to GitGenius on September 9th, 2026
Created on June 14th, 2013
Open Issues & Pull Requests: 7 (+0)
GitHub issues: Enabled
Number of forks: 965
Total Stargazers: 6,932 (+0)
Total Subscribers: 139 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 2.3 hours
Mean response time: 4.1 days
90th percentile: 3.8 days
Tracked items: 67

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 9% of issues opened in the past year have been closed. Three people close 93% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 3
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 2,062 days
Stale 30+ days: 3
Stale 90+ days: 3

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (11)
  • enhancement (5)
  • question (4)
  • Browser Issue (1)
  • Help wanted (1)
  • wontfix (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

iframe-resizer is a JavaScript library that automatically resizes iframes to match their content dimensions.

The problem it solves is the difficulty of keeping iframes sized appropriately when their content changes or when the iframe and parent page are on different domains. Standard iframe elements do not automatically adjust their height or width based on content, and cross-origin restrictions prevent the parent page from directly measuring the embedded content. The library works by injecting a small script into the iframe that measures its content and communicates the dimensions back to the parent page, which then resizes the iframe accordingly. This approach handles both same-origin and cross-origin scenarios, with the cross-origin case using postMessage for secure communication.

The tool suits projects where iframes are embedded as a core part of the page layout and content dimensions are unpredictable or change dynamically. It is particularly valuable when embedding third-party content, user-generated content, or responsive pages within iframes, since manual dimension management becomes impractical. Developers should choose this library if they need reliable, automatic iframe resizing without building custom solutions. The README does not compare it to alternatives.

The project shows sustained maintenance with fixes and updates applied to address reported issues. The codebase receives ongoing refinement to handle edge cases and improve compatibility across different scenarios. Development activity demonstrates responsiveness to user-reported problems and a commitment to keeping the library functional across changing browser environments.