Cloudinary Blog

Introducing Cloudinary’s Gatsby Plugins

Announcing two new Gatsby plugins from Cloudinary

Wouldn’t it be cool to have the powers of Gatsby rendering performant pages and serving optimized and transformed media files from Cloudinary on the same site? That’s now a reality: I’m excited to introduce two Gatsby plugins on Cloudinary: Gatsby-Source-Cloudinary and Gatsby-Transformer-Cloudinary.

Here’s the background. Given that the rise of JAMstack has empowered engineers to efficiently build fast, scalable, secure, and easily-deployed apps, Gatsby further enables the development of websites with the React and JAMstack architecture. To do that, Gatsby simply takes data from multiple data sources and builds interactive webpages, which you can, in turn, deploy to content delivery networks (CDNs) as static HTML, CSS, and JavaScript files.

Because concurrent media delivery is parament for delivering performant web pages, you can accomplish that with the Gatsby plugins by storing media assets in a CDN and optimally serving them with on-the-fly transformations. The plugins bring you the best of both worlds: optimized media delivery along with high-performing web and mobile apps.

Webinar
How to Optimize for Page Load Speed

Gatsby-Source-Cloudinary

Gatsby-Source-Cloudinary is a source plugin that fetches stored images at build time from Cloudinary to a Gatsby-powered site. The plugin creates in GraphQL file nodes that you can query on your app. That means your images need not live locally on your project anymore and are served optimally from Cloudinary.

Gatsby-Transformer-Cloudinary

The Gatsby-Transformer-Cloudinary plugin uploads your locally-stored images to Cloudinary, returns their data, and transforms those images into file nodes in Gatsby, rendering their formats compatible and usable with gatsby-image. You can then apply Cloudinary transformations within GraphQL queries, which return the transformed images on build.

Steps for Getting Started

To start using Cloudinary’s two Gatsby plugins, follow these steps:

  1. Create a free account on Cloudinary.
  2. Create a Gatsby project with one of the Gatsby starters.
  3. Configure either of the Gatsby plugins in gatsby-config.js.
  4. Refer to the documentation for the source plugin and the transformer plugin for the procedures on how to query Cloudinary images and to upload and transform uploaded images, respectively.

The Next Horizon

Cloudinary’s Gatsby plugins were built and maintained by the community. Watch this Learn With Jason video for details on how to build the transformer plugin.

We’ll continue to work on improving the development experience for building apps with the Gatsby plugins through bug fixes and the creation of new features that ship on Gatsby or Cloudinary. If you spot a bug, do send us a pull request or open an issue. In particular, watch this space for a series of blog posts on use cases that will demonstrate how to leverage the two Gatsby plugins for your app.

About Cloudinary

Cloudinary provides easy-to-use, cloud-based media management solutions for the world’s top brands. With offices in the US, UK and Israel, Cloudinary has quickly become the de facto solution used by developers and marketers at major companies around the world to streamline rich media management and deliver optimal end-user experiences.

For more information, visit www.cloudinary.com or follow us on Twitter

Recent Blog Posts

 Lazy-Load React to Enhance Page Performance for Your Apps

React is a popular open-source JavaScript library for creating user interfaces (UIs) for single-page web applications, with React Native slated for building mobile apps. Helpfully, React organizes UIs into collections of reusable components, rendering feature management a cakewalk. However, to boost user engagement, conversion, and SEO ranking, you must optimize your app for fast page loads.

Read more
The Hub Helps Creative Talent Win Brand Work with Cloudinary

The Hub is decentralizing the creative process through its two-sided online marketplace that changes the way brands hire creators. The old model of committing all creative resources to one agency of record has proven time-consuming and expensive. Additionally, brands are limited to content that is only as good as the handful of people on that agency’s team.

Read more
A Primer on Microbrowsers

How we browse online in our quest of information has largely been an unknown factor since the Internet became ubiquitous in the mid-1990s. What’s indisputable is that we’re unlikely to type in URLs as a start, especially if we don’t have clues as to which site to visit. Google search revolutionized the ability to find relevant information through keyword entries, leading to the emergence of search-engine optimization (SEO), whereby you as site owners ensure that the popular keywords appear in your content.

Read more
Top 5 Reasons for Attending ImageCon 2020: A Digital Experience

ImageCon, Cloudinary’s annual conference on innovating the Visual Web, will be held digitally between July 27-30 with an agenda that outdoes the past years’, featuring presentations by developers, creatives, and marketing professionals across the globe. Not only will you learn the latest groundbreaking technologies, strategies, and best practices for media management, you’ll also have many opportunities to interact with our speakers and ask them questions live during the live Q&A sessions.

Read more
AI-based Automatic Image Cropping for E-Commerce

If you’ve come across this post and, based on the title, are expecting insights into object-oriented programming languages, then please forgive me for overloading the term object-oriented. I hope you don’t object when you discover that the objects in this post are not so much the instantiated class types, but real-life objects found in images. It is helpful though if you’re familiar with the likes of Java, PHP, Javascript or other popular frameworks, as you’ll be able to implement these automatic image cropping techniques in your code. Anyway, let’s cut to the chase - or should that be crop to the object...?

Read more