
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
netlify-plugin-add-instagram
Advanced tools
A Netlify plugin to fetch and cache recent Instagram data and images
This plugin adds the ability to source fetch and cache recent Instagram images so that they can be served as part of the site from the same domain, rather than serving directly from Facebook's Instagram CDN.
Some browser settings and extensions throttle or block serving assets from Facebook's CDN for privacy reasons. Serving these assets directly from the same CDN and domain as the rest of the site should give a small performance benefit too.
This plugin requests data from Instagram feed that you associated with an Instagram Key that you will need to provide as an environment variable. It will save this data as JSON in the Netlify build cache and only re-request the feed after a specified time-to-live value has elapsed. It will also save all the image assets in the Netlify Build cache between builds and place them in the specified location for your static site generator to use.
Configure this plugin to present the gathered data and images in the appropriate location, so your chosen static site generator can leverage it during the build.
See this plugin being used in this simplified demo site: https://demo-netlify-plugin-add-instagram.netlify.app/
To include this plugin in your site deployment:
# Add the plugin as a dependency of your build
npm i --s netlify-plugin-add-instagram
This plugin will fetch the specified instagram feed and the latest 12 images and stash them prior to the execution of the build
command you have specified in your Netlify configuration. The desired Instagram username and various caching attributes can be specified in the netlify.toml
config file as shown below.
# Config for the Netlify Build Plugin: netlify-plugin-add-instagram
[[plugins]]
package = "netlify-plugin-add-instagram"
[plugins.inputs]
# Where to put the image files
imageFolder = "src/images/instagram"
# Also stash data about the images in a json file
dataFile = "src/_data/instagram.json"
# How many seconds should we cache the instagram feed for?
feedTTL = 30
# How many seconds should we cache each instagram image for?
imageTTL = 1209600 # 2 weeks
# Which of Instagram's image sizes should we fetch?
# t (thumbnail)
# m (medium)
# l (large)
imageSize = "m"
# Instagram username
username = "philhawksworth"
Visit the Build Plugins page in the Netlify Admin to enable build plugins on your site.
You can try out this plugin by deploying a simple site which uses it.
Clicking the button below will clone a test site repo, setup a new site on Netlify and deploy the site complete with the plugin configured and operational.
FAQs
A Netlify plugin to fetch and cache recent Instagram data and images
The npm package netlify-plugin-add-instagram receives a total of 13 weekly downloads. As such, netlify-plugin-add-instagram popularity was classified as not popular.
We found that netlify-plugin-add-instagram demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.