How to Embed an Instagram Feed on Your Website
For a few posts, use Instagram's own embed code for each post or reel and paste it into an HTML block on your page. For a self-updating grid, you need either a feed widget service or your own connection through Meta's Instagram API, since the old Basic Display API stopped working on December 4, 2024.
| Approach | Updates itself? | Effort |
|---|---|---|
| Official embed per post or reel | No, one post each | Copy and paste |
| Feed widget service | Yes | Sign up, connect the account, paste a snippet |
| Your own Instagram API connection | Yes | A developer, a Meta app and a server |
| Link or button to your profile | Not needed | Minutes |
Updated
Paste an Instagram link to check whether Meta's oEmbed endpoint accepts that kind of URL, and see the request a developer would make for its embed code. The checker only reads the shape of the link in your browser. It does not contact Instagram, so it cannot tell whether the account is private.
Instagram link checker
Instagram link: https://www.instagram.com/p/EXAMPLE123/
The sample link is made up.
A post (single image or carousel). oEmbed accepts this format.
oEmbed request a developer would make
GET https://graph.facebook.com/instagram_oembed?url=https%3A%2F%2Fwww.instagram.com%2Fp%2FEXAMPLE123%2FMeta's oEmbed documentation explains the app access needed to call it.
Load embeds only when they are needed
Paste Instagram's embed code for each post inside the container without its script tag, then load the script when the visitor scrolls close.
Lazy-load Instagram's embed script
Set EMBED_SCRIPT to the script address in the embed code Instagram gave you. instgrm.Embeds.process() turns the pasted blockquotes into embeds.
// Paste the script src from the embed code Instagram gave you.
const EMBED_SCRIPT = "PASTE_SCRIPT_SRC_FROM_YOUR_EMBED_CODE";
const feed = document.querySelector("#instagram-feed");
const observer = new IntersectionObserver((entries) => {
if (!entries.some((e) => e.isIntersecting)) return;
observer.disconnect();
const s = document.createElement("script");
s.src = EMBED_SCRIPT;
s.async = true;
s.onload = () => window.instgrm && window.instgrm.Embeds.process();
document.body.appendChild(s);
}, { rootMargin: "400px" });
observer.observe(feed);
What changed in 2024
Many older tutorials and free plugins relied on the Basic Display API, which let any personal account share its photos with a website. Meta switched it off on December 4, 2024, which is why some feeds that worked for years suddenly went empty.
Today a live feed goes through the Instagram API for professional accounts. Widget services handle that connection for you; building it yourself means a Meta app, tokens and a server to fetch posts.
Keep the page fast
Embeds pull in third-party script and full-size media. Put them below the first screen, and load the script only when the visitor scrolls near the feed, as the example below does.
How it works
- Decide whether you want a handful of chosen posts or a grid that follows your latest uploads.
- For chosen posts, copy each post's embed code from Instagram and paste it into an HTML or embed block.
- For a live grid, pick a widget service or ask a developer to use the Instagram API with your professional account.
- Place the feed low on the page and load it lazily, so it does not slow the first view.
Tips
- Only public posts embed. Meta's docs list posts on private, inactive and age-restricted accounts as unsupported.
- Stories cannot be embedded through oEmbed.
- Each embed loads Instagram's script and its media, so keep the count low on pages that phones open first.
- A plain image grid that links to your profile is lighter than any embed and often works just as well.
Frequently asked questions
Can I still use the Instagram Basic Display API?
No. Meta announced that from December 4, 2024 the Basic Display API would no longer be available and requests to it would fail. Meta pointed business use to the Instagram API with Instagram Login or with Facebook Login.
Can I embed a whole Instagram profile?
Meta's oEmbed endpoint lists profile URLs, in the form instagram.com/username, among the accepted formats, alongside posts and reels.
Why does my embed show a blank box?
The embed relies on the script tag at the end of the embed code Instagram gives you. If the script is blocked, removed by your builder, or the HTML was added after it loaded, call instgrm.Embeds.process() once the script is on the page.
Do I need a business account?
Single post embeds come from public posts. API connections for a live feed are built around professional (business or creator) accounts.
Is a feed widget safe to use?
Widgets need permission to read your account. Use a well-known service, read what access it asks for, and remove it in your Instagram settings if you stop using it.
Related: How to sell on Instagram, Social media image sizes, Iframe generator, Instagram marketing strategy.
Build your site free or see all free tools. On We.Inc you can build your site free, with no card and no trial needed to start. AI building is on paid plans from $19 a month.
More in Guides
- How to Embed a PDF on Your Website
- How to Embed Spotify on Your Website
- How to Embed a TikTok Video on Your Website
- How to Embed a Vimeo Video on Your Website
- How to Embed a YouTube Video on Your Website
- How to Find Which Shopify Theme a Store Uses
- How to Fix Wrong Facts About Your Business in AI Answers | How-to Guide
- How to get a free business email address
Product
Who It's For
- For Agencies
- For Freelancers
- For Hosting Providers
- For SaaS Platforms
- For Startups
- For Financial Services
- For Healthcare
Features
Resources
- Blog
- Help Center
- Free Business Tools
- Free UI Components
- Website Templates
- Template Collections
- Website Examples
- Guides
- Comparisons
- Alternatives
- Best Lists
- Reviews
- Pricing Guides
- Use Cases
- Glossary & Guides
- Integrations
- Developers
- Benchmark
- Windows App