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.

Ways to show Instagram on your site
ApproachUpdates itself?Effort
Official embed per post or reelNo, one post eachCopy and paste
Feed widget serviceYesSign up, connect the account, paste a snippet
Your own Instagram API connectionYesA developer, a Meta app and a server
Link or button to your profileNot neededMinutes

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%2F

Meta'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

  1. Decide whether you want a handful of chosen posts or a grid that follows your latest uploads.
  2. For chosen posts, copy each post's embed code from Instagram and paste it into an HTML or embed block.
  3. For a live grid, pick a widget service or ask a developer to use the Instagram API with your professional account.
  4. Place the feed low on the page and load it lazily, so it does not slow the first view.

Tips

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, Grow your Instagram following, Social media image sizes, Iframe generator, Instagram marketing strategy.

Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.

More in Guides

We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.

Product

Who It's For

Features

Resources

Company

View Sitemap