prelo
DeprecatedSuperseded by the built-in Media embeds module. The Instagram Basic Display API this plugin relied on has been retired by Meta.Migration note ↗
Plugins / Instagram feed

Instagram feed

Embed a profile feed on any page. Superseded by the Media embeds module.

Dgithub.com/dpetrovIntegrationsprelo >= 0.2Updated Jun 2026
Use this plugin
1
2
or point your agent at the spec:
Your agent reads the spec and writes the code into your project. Review the diff like any change.

What this adds

Deprecated. Meta retired the Instagram Basic Display API that this plugin was built on, and Prelo's Media embeds module now covers embedding Instagram posts without an API token. Do not implement this spec in new projects — use Media embeds. This page remains for sites that shipped it.

A grid of recent posts from an Instagram profile on any page of your site, refreshed automatically and served from your own domain — no Instagram iframe, no layout jank.

How it works

A custom route fetched the profile's recent media through the Instagram Basic Display API using a long-lived token from an env var, cached the response in an x_instagram_cache table (Instagram rate limits are unforgiving), and a frontend component rendered the grid from the cached JSON.

The spec your agent followsexpand ▾
**Do not implement this in a new project** — it depends on a retired API. If you are maintaining an existing installation:

1. **Migration (recommended).** Replace the feed with the Media embeds module: remove the `"GET /instagram"` route, the `x_instagram_cache` boot statement, and the `INSTAGRAM_TOKEN` env var; swap the grid component for embed blocks of the specific posts the owner wants to feature. Embedded posts are curated rather than auto-updating — confirm the owner accepts that trade before removing the old code.

2. **Historical spec (what existing installs contain):**
   - `hooks.boot` created `x_instagram_cache (k TEXT PRIMARY KEY, json TEXT, at INTEGER)`.
   - Route `"GET /instagram"`: served cached JSON if younger than 6 hours; otherwise fetched `https://graph.instagram.com/me/media?fields=id,caption,media_type,media_url,thumbnail_url,permalink&access_token={INSTAGRAM_TOKEN}`, stored the first 12 items, and served them. On upstream failure it served stale cache forever rather than erroring.
   - A token-refresh call (`/refresh_access_token`) ran when the cached token age exceeded 30 days, persisting the new token in the cache table.
   - Frontend `InstagramFeed` component: responsive grid of square thumbnails linking to `permalink`, captions as `alt`/`title`, `loading="lazy"`.

3. **If the feed is currently broken** on a live site, that is expected (retired API): remove the section from affected pages or complete the migration in step 1. Don't chase token errors — no token works anymore.

After it's built

Not applicable for new sites — see the deprecation note. Migrated sites manage embedded posts through the Media embeds module in Studio.