SDAweb Social Galleri Feed
Display your Instagram feed as a responsive gallery with multi-account support, Stories, lightbox, instant loading, and full admin control.
Install in
SDAweb Social Galleri Feed connects to the Instagram Graph API and displays your posts in a customizable grid gallery with lightbox. Supports multiple Instagram accounts — connect up to 20 accounts and display different feeds on different pages. Built for speed — feeds load instantly on cached pages with zero network requests.
Features
Multi-Account Support
* Connect up to 20 Instagram accounts, each with its own token and cache
* Per-account test connection, cache management, and failure tracking
* Display different accounts on different pages with the account shortcode attribute
* Visual Shortcode Builder shows which account you’re building for
Layout & Design
* Multiple layouts — Grid, masonry, and highlight modes
* Responsive columns — Separate settings for desktop, laptop, tablet, and mobile
* Profile header — Avatar, username, follower count, bio, and follow button
* Hover effects — Overlay on image hover with gradient
* Color pickers — Customize likes icon, comments icon, and date text colors
Instagram Stories
* Story ring — Gradient ring on avatar when Stories are active (like Instagram)
* Fullscreen Story viewer — Auto-advance, tap navigation, progress bars, keyboard support
* Video Stories play automatically (muted by default)
* Per-account Stories refresh every 15 minutes via WP-Cron
* Toggle on/off globally or per shortcode
Lightbox
* Fullscreen lightbox — Carousel navigation with keyboard and swipe support
* Swipe-up-to-close — Mobile-native gesture
* Engagement stats — Likes, comments, media type badge, and relative date
Content & Filtering
* Multiple feeds — Use feed_id attribute for independent feeds on different pages
* Hashtag filtering — Include or exclude posts by hashtag
* Media type filter — Filter by image, video, or carousel
* Load more — Paginated loading with customizable button
Performance
* Instant loading — The first screens are built into the page, zero network requests on cache hit
* REST API endpoint with legacy AJAX fallback
* Stale-while-revalidate — Expired cache served instantly while refreshing
* Per-account WP-Cron background refresh — All caches stay warm automatically
* Lean pages — Only the posts a page can show are built into it; Load more fetches the rest on demand
* Lazy loading and incremental grid rendering
* Local picture cache — Pictures are copied to your uploads folder in three sizes during the background refresh and served from your site with a srcset; a phone loads a 320 px copy instead of Instagram’s 2 MB original, visitors’ browsers never connect to Meta for pictures, and the gallery survives Instagram’s expiring picture links. Can be switched off.
* Per-IP rate limiting
Localization
* All 30+ frontend strings configurable in admin (translated defaults, override any of them)
* Relative timestamps and month names customizable
Security
* Bearer token authentication — API token sent via Authorization header
* AES-256-CBC token encryption at rest with random IV per encryption
* CSRF protection — check_admin_referer() on all admin actions
* XSS prevention — gallery built with DOM methods, all output escaped
* Clean uninstall — Removes all options, transients, and cron jobs per account
Accessibility
* Full keyboard navigation in lightbox and gallery
* ARIA labels and screen reader support
* Respects prefers-reduced-motion
Shortcode
[sdawsoga_gallery]
Shortcode Attributes
account— Account slug from Accounts tab (default: default account)feed_id— Gallery name for CSS targetinglimit— Number of posts to display (default: 9)columns— Number of columns (default: 3)layout— grid, masonry, or highlightaspect_ratio— square, portrait, instagram, or originalpadding— Gap between images in pixelsshow_header— Show/hide profile header (true/false)show_loadmore— Show/hide load more button (true/false)hover_effect— Enable/disable hover overlay (true/false)filter_type— all, image, video, or carouselhashtag— Only show posts containing this hashtagexclude_hashtags— Comma-separated hashtags to excludeshow_stories— Show/hide Instagram Stories ring (true/false)
Requirements
- A Facebook Page connected to an Instagram Business or Creator account
- A valid Facebook Page Access Token with the
instagram_basic,pages_show_list,pages_read_engagement, andinstagram_manage_insightspermissions (all four are required for the feed) - PHP 7.4+ and WordPress 5.8+
Third-Party Services
This plugin connects to the Instagram Graph API (via Facebook) to retrieve your Instagram posts, profile information, and engagement metrics.
- Service: Instagram Graph API / Facebook Graph API
- Website: https://developers.facebook.com/
- Terms of Use: https://developers.facebook.com/terms/
- Privacy Policy: https://www.facebook.com/privacy/policy/
When data is sent: When the plugin refreshes the feed cache — by the WP-Cron background refresh, by “Refresh now” or a settings change in the admin panel, or when a visitor opens a gallery page while the cache is empty. With default settings, this happens approximately once per hour.
What data is sent: Your Facebook Page Access Token and Instagram Business Account ID are sent to Facebook’s servers to authenticate and retrieve your posts. No visitor information is included in these requests.
Pictures: with the default setting “Serve pictures from this site” (Behavior tab), the plugin copies the pictures of your posts to your site’s uploads folder during its background refresh, and visitors’ browsers load them from your site. Until a picture has been copied, and whenever the setting is off, pictures are loaded by the visitor’s browser directly from Instagram’s media servers (cdninstagram.com and fbcdn.net, operated by Meta), as with any embedded Instagram content; Meta then receives the visitor’s IP address and browser details for those requests, under the privacy policy linked above. Videos are always played from Instagram’s servers when a visitor starts them, and Stories, if enabled, are loaded from Instagram’s servers. When a visitor opens a gallery page while the cache is empty, the plugin stores a one-way hash of the visitor’s IP address for five minutes to limit how often Instagram is contacted. The plugin sets no cookies. A suggested privacy-policy text is provided under Settings Privacy Policy Guide.
Written by Joobi from the project's own listing. See the source page
The most recent releases are listed here. The complete history is in changelog.txt in the plugin folder.
6.2.1
- Tested with WordPress 7.2.
- Fixed: the Shortcode Builder used a jQuery function that a coming jQuery version removes; WordPress 7.2 already reports it in the browser console. It now uses the browser’s own function. Nothing changes in how the builder works.
- Fixed: the translation template (.pot) shipped with the plugin lacked 42 texts and had six texts cut off at an apostrophe. It is now generated from the plugin’s code.
6.2.0
- New: the page shows the gallery before the script has run. The header (profile picture, name, bio, counts, Follow button) and the first row of pictures are now printed by the server from the stored feed. The browser starts on the first pictures while it is still reading the page, the content under the gallery no longer jumps when the gallery appears, and visitors and search engines without JavaScript see pictures instead of “Loading gallery…”. The script then takes over the same pictures without a flicker. A gallery that filters posts (by type, hashtag or blocked words) or uses the Masonry or Highlight layout gets the header this way but not the tiles, so nothing that is about to be filtered out is shown
- Fixed: on a site where nothing runs WordPress’s scheduled jobs (for example DISABLE_WP_CRON in wp-config.php with a server cron job that has stopped), the feed was never refreshed again once its cache had expired: the gallery stayed on its 50-post backup copy and pictures and videos still loaded from Instagram stopped working after a few days. A refresh that is more than five minutes overdue is now run by the plugin itself, right after a page has been sent to a visitor, in the same short, resumable steps
- New: Site Health says so when scheduled jobs are not running on the site, with what to check
- Fixed: for screen-reader users, “Load more” made the reader go through the caption of every new post in a row. It now says how many posts were added (“12 more posts loaded”)
- Fixed: a post whose picture could not be loaded was removed from the grid but still came up in the lightbox, as a broken picture on black, when stepping through posts. The lightbox now steps over it
- Fixed (settings page): pressing Enter in an account’s Edit form or in a Shortcode Builder field saved the whole settings page and reloaded it, which discarded a token just pasted into the Edit form. Enter in the Edit form now saves that account; in the builder it does nothing
- Fixed (settings page): the Edit and Delete buttons of an account, which show only an icon, now have a name for screen readers and a tooltip
6.1.0
- Changed: the background refresh can no longer get stuck on a slow server. A large feed takes up to ten requests to Instagram; they all had to succeed within one run, and when the server stopped that run nothing was stored. The refresh now works for at most 20 seconds at a time, keeps what it has fetched and continues a minute later, and the feed on your site is replaced only when the refresh is complete. A site where the server has stopped a refresh before uses shorter runs and saves its progress after every request
- Fixed: when one request in the middle of a refresh failed, the posts fetched so far became “the feed”: the gallery shrank until the next refresh and the stored pictures of all later posts were deleted and copied again. The refresh now tries that request again in the next run, and gives up as a failure after three attempts, leaving the complete feed in place
- Fixed: the next refresh is now scheduled before the work starts, so a run that is cut off still has a retry waiting ten minutes later
- Changed: copying pictures no longer runs in the same server process as a refresh, or right before one that is due; the two together could exceed the server’s time limit
- Fixed: pictures copied before 6.0.2 that were stored smaller than they should be (most visibly a video’s cover picture, blurred in the lightbox) are copied again once, in the background
- New: a test under Tools > Site Health, “Instagram feed refresh”, turns to “recommended” when a feed has not been refreshed for three refresh intervals and to “critical” after a day, naming the account and the latest recorded problem
- New: optional e-mail to the site administrator when a feed has not been refreshed for a whole day, at most once a week for each feed. Off by default; switch it on under Behavior
- Changed: lighter pages. Pictures stored on your site are sent to the browser in a short form instead of three long addresses each; on a page with 50 posts and many albums the feed data is about two thirds smaller (measured: 183 KB to 59 KB before compression). The gallery looks and works the same
- Fixed: on/off settings and numbers reach the browser script as real values instead of text, and addresses and letters such as æ, ø and å are no longer written in escaped form
- Changed: the plugin now talks to version 27.0 of Meta’s Graph API (was 26.0). No change in what is requested
- Developers: new action
sdawsoga_sync_attemptedand new filtersdawsoga_sync_time_budget; the REST route acceptspack=1for the short picture form and answers with full addresses without it. See docs/hooks.md
6.0.2
- Fixed: videos that Instagram no longer lets other sites play. Since 30 July 2026 Instagram leaves out the video file for reels with licensed music and for reels whose owner has switched off downloads. Such a post opened an empty video player in the lightbox. It now shows the video’s cover picture with a “Watch on Instagram” button that opens the post in a new tab. The button text can be changed under Translations (“Video link”)
- Fixed: the profile picture, and any picture that is not wider than the size it is stored in, was never copied to your site and kept loading from Instagram (the settings page counted them as “could not be downloaded”). They are now stored at their own width. They are picked up at the next refresh; nothing needs to be done
- New: the Accounts tab shows when each feed was last fetched (“Last synced 20 minutes ago”), a clear warning when a feed has not been refreshed for three refresh intervals (at least three hours), and a list of the problems recorded in the last week. Until now a feed that had stopped refreshing only said “Using backup data, auto-refreshing soon”
- Fixed: a refresh that the server stops half-way (a time limit, a dropped connection) left no trace: no failure was counted and nothing was logged. It is now counted and listed, so a feed that cannot finish its refresh shows up as failing
- Fixed: on sites whose object cache does not keep large values, the fetched feed could be lost right after a successful refresh, leaving the gallery on its 50-post backup copy. The plugin now checks that the feed was kept and stores it in the database when it was not
- Fixed: “Refresh now” and “Clear cache” also emptied the list of recorded problems; the list is now kept (entries expire after a week)
- Changed: a Stories refresh that keeps failing is retried less and less often (up to once a day) instead of every 15 minutes, and is back to every 15 minutes after the first success. It no longer fills the problem list or uses up Instagram’s request allowance
6.0.1
- Changed: copied pictures are stored as WebP where the server can write it (nearly every host), about a third smaller than the JPEG copies 6.0.0 made, at the same visual quality; JPEG is used where WebP is not available, and the settings page says which. Pictures already copied by 6.0.0 are kept as they are; switch the setting off and on again to rebuild them as WebP.
- Changed: album slides, which appear only in the lightbox, are stored in two sizes (640 and 1080 pixels) instead of three, and the copy quality is 80. For an account with many albums the cache is roughly a third smaller again.
- Fixed: the settings page quoted a fixed “about 200 MB”; it now shows the expected size for each account, computed from the pictures copied so far (an account with 300 posts and many albums has over 1,400 pictures, not the 750 that figure assumed).
- Developers: two new filters,
sdawsoga_media_cache_slide_sizesandsdawsoga_media_cache_mime. See docs/hooks.md.
6.0.0
- New: pictures are served from your own site. During the background refresh the plugin now copies each post’s picture into the uploads folder (wp-content/uploads/sdawsoga//) in 320, 640 and 1080 pixel widths, and the gallery loads them from there with a srcset, so a phone gets the 320 px copy. Instagram offers one size only, the full original of 1 to 2.4 MB per picture: on the test site a phone view of 20 posts loaded 14.5 MB of pictures, which this brings down to well under 1 MB. Visitors’ browsers no longer connect to Meta for pictures, and the gallery keeps showing pictures after Instagram’s signed picture links expire. Copying runs in the background in small batches after each refresh and needs about 200 MB for 300 posts with albums; until a picture has been copied it is shown from Instagram as before. Videos still play from Instagram; their poster picture is cached. The setting “Serve pictures from this site” (Behavior tab) is on by default; switching it off deletes the copies. Deleting an account, or the plugin, deletes its copies. Requires the GD or Imagick PHP extension, present on nearly every host; without it the plugin behaves as before and the settings page says so.
- Changed: the suggested privacy text and the readme describe the new picture handling, and now mention the five-minute hashed-address marker the rate limiter stores on an empty cache.
- Changed: the preconnect hints in the page head point only at hosts the page really loads pictures from; with the picture cache filled there are none.
- Developers: two new filters,
sdawsoga_media_cache_enabledandsdawsoga_media_cache_sizes; posts passed tosdawsoga_feed_itemnow carrymedia_srcset(orthumbnail_srcsetfor videos) next to a local address when a copy exists. See docs/hooks.md. - Also includes the 5.4.1 fixes below, which were not released separately.
5.4.1
- Security: a malformed request to the feed route (
?account[]=x) caused a PHP fatal error on PHP 8. Anyone could send it, without logging in, which filled the error log and could set off WordPress’s “technical issue” email to the site administrator. No data was exposed. The request now gets an ordinary 400 answer. - Fixed: while the feed could not be refreshed (an expired token, an Instagram rate limit), every page view started another Instagram request, even though the next retry was scheduled up to 24 hours later. Page views now leave a failing account alone until its retry, and visitors can start at most one background refresh per account every five minutes. Saving settings still refreshes at once, and any successful fetch ends the waiting period.
- Fixed: Load more stopped for good, with no message, when a security plugin or firewall blocked the REST API for visitors: the gallery ended at the posts built into the page. It now falls back to admin-ajax, as the first load already did. If that fails too, the button stays so the visitor can try again, and no posts are skipped.
- Fixed: accounts whose label contains an underscore or is long (over 50 characters as a slug) were refused by the REST route, so their galleries also ended at the posts built into the page.
- Fixed: the AJAX route returned the raw cached feed, so a post hidden with the
sdawsoga_feed_itemfilter could still be fetched there, along with posts without a picture and Instagram’s paging cursors. It now answers exactly like the REST route, and also accepts offset and per_page. - Fixed: with the gallery header turned off (
show_header="false"or the block setting), the lightbox had no profile picture and showed a lone “@” before the caption. - Fixed: screen readers read the lightbox picture’s description with HTML codes such as
&and'in it. - Fixed: the keyboard focus outline never showed on album dots and the Stories avatar and arrows, because the style rule named classes that do not exist.
- Changed: the lightbox arrows’ source strings are now English (“Previous”, “Next”) instead of Norwegian. Sites without a translation of the plugin will have these two screen-reader labels in English.
- Changed: each failed Instagram request is listed once in the plugin’s recent errors instead of twice, and a sync that stops partway is now listed too.
- Fixed: the “Enable Lightbox” and “Enable Schema” switches had no effect when turned off: the lightbox still opened and the schema.org data was still written. WordPress hands the settings to the browser as text, and the script compared them with the wrong type.
- Fixed: a blocked-words list typed one word per line was saved as a single phrase, so nothing was blocked. Line breaks are kept and read as separators now; commas still work.
- Fixed: in the gallery block, “Show header” and “Show Load more” switched on had no effect when the same setting was off in the plugin settings, although the editor said “Shown”. The block’s own choice now applies either way. If your plugin settings hide the header or the button but a block has the switch on, that block shows them after this update; switch it off in the block to keep them hidden.
- Fixed: the Translations help text told you to write “%1$d” for the number, which the gallery does not understand; the placeholder is “%d”.
- Fixed: the slide arrows in the lightbox were invisible while a keyboard user had focus on them, and never appeared on touch screens, where there is no hover. They show on focus and are always visible on touch screens.
- Fixed: the album dots in the lightbox were 7 pixels wide to tap. The dots look the same but accept a 25-pixel tap, and the current dot is marked for screen readers.
- Fixed: a tile growing on hover was clipped by its neighbours along the right and bottom edges.
- Changed: the first row of pictures is marked as high priority for the browser, and the row length follows the column count in effect at that screen size instead of the desktop value.
- Changed: help texts pointed to an “API tab” and a “Buttons tab” that do not exist; they name the Accounts and Appearance tabs now.
5.4.0
- Changed: pages load much faster. A page with a gallery used to carry the complete cached feed of every account — all 300 posts with every picture address and every album slide, about 1 MB on a page that shows 50 posts. The page now carries only what its galleries can show, with one extra “Load more” batch so the first click is still instant; later clicks fetch the next posts from the plugin’s own REST route, and visitors who never click download nothing more. Accounts not used on the page are no longer written into it, and posts Instagram delivers without a picture never leave the server. A gallery with a hashtag, exclude or media-type filter still receives the whole feed, because it filters in the browser. On the test site the page went from 1.2 MB to well under half of that.
- Changed: the REST route /wp-json/sdawsoga/v1/feed accepts offset and per_page to page through a feed; without them it answers with the whole feed as before.
- Changed: the plugin’s per-address rate limit (10 requests per 5 minutes) now applies only to requests that actually go to Instagram. It used to count every call to the plugin’s REST route, cached answers included, so a visitor clicking Load more more than ten times in five minutes — or a classroom behind one shared address — was cut off with an error.
- Changed (developers): the
sdawsoga_cached_feed_datafilter now also runs on the page itself, where nearly every gallery view gets its posts; before, it ran only on the REST and AJAX routes, so a filter written after docs/hooks.md had no visible effect. The schema.org JSON-LD is now printed by PHP whenever the feed is on the page, so thesdawsoga_schema_markupfilter fires too (same shape, once per page). docs/hooks.md gains a “Which hooks fire” section: eleven of the documented hooks live in renderer helpers the default browser-built gallery never calls, and the reference now says so and shows how to get the same result withsdawsoga_cached_feed_data. - Added (developers): four new hooks.
sdawsoga_feed_itemfilters one post at a time just before it leaves the server (page and REST route) — rewrite a picture address or caption, or return false to hide the post;sdawsoga_feed_refreshedfires after a fresh feed has been stored, the moment to purge a page cache;sdawsoga_feed_needchanges what a gallery asks to have inlined;sdawsoga_frontend_configfilters everything handed to the browser script. All documented in docs/hooks.md. - Fixed: the gallery block’s “Wide width”, “Full width” and HTML anchor settings had no effect on the page — the block declared them but its output never carried the alignment class or the id. They work now. In the editor the block used to show “Loading gallery…” for ever, because the script that builds the gallery never runs inside the editor; it now shows a card with the block’s settings instead, and the gallery appears on the published page as before.
- Fixed: in a theme that styles every picture inside a full-width block (The7 sets them to the full viewport width), a gallery block set to Wide or Full width showed each tile as a zoomed-in sliver of its picture, and the lightbox’s profile picture became viewport-wide. The gallery’s own picture sizes now take precedence over such theme rules.
- Fixed: the Stories viewer now behaves as a dialog for keyboard and screen-reader users. It is announced as “Instagram Stories”, focus moves to its Close button when it opens, Escape and the left/right arrow keys work wherever focus is, Tab stays inside the viewer, and closing it returns focus to the profile avatar. Before, the keys only worked after clicking inside the viewer, and Tab wandered through the gallery behind it. A story video that cannot load now moves on to the next story instead of stopping the viewer.
- Changed: the browser is told to connect early to the picture servers the feed actually uses. Instagram hands out regional addresses (for example scontent-arn2-1.cdninstagram.com), so the fixed address the plugin named before was never the one the pictures loaded from.
- Changed: the pictures in the first row of the gallery are no longer marked for lazy loading, so the browser fetches them at once instead of waiting until layout is done; pictures fur
Follow this listing's changes (Atom feed)