• Stars
    star
    181
  • Rank 212,110 (Top 5 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 2 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⚡️ High-performance image delivery and uploading at scale in Next.js powered by Cloudinary.
Cloudinary    Nextjs

GitHub Workflow Status npm GitHub

Next Cloudinary

High-performance image delivery and uploading at scale in Next.js powered by Cloudinary.

FeaturesGetting StartedCommunity & SupportContributing

This plugin is a community library and not officially supported by Cloudinary.

Features

  • Automatically optimize images and deliver in modern formats
  • Remove backgrounds from images
  • Dynamically add image and text overlays to images
  • AI-based cropping and resizing
  • Transform images using color and effects
  • Generate Open Graph Social Media cards on the fly
  • Drop-in Upload Widget
  • ...all at scale with Cloudinary

🚀 Getting Started

Installation

  • Install next-cloudinary with:
yarn add next-cloudinary
# or
npm install next-cloudinary
  • Add an environment variable with your Cloud Name:
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="<Your Cloud Name>"

Adding an Image

import { CldImage } from 'next-cloudinary';

<CldImage width="600" height="600" src="<Public ID or Cloudinary URL>" alt="<Alt Text>" />

Learn more about CldImage on the Next Cloudinary Docs

Generating an Social Media Card (Open Graph)

<CldOgImage src="<Public ID or Cloudinary URL>" text="Next Cloudinary" />

Note: The width and height is not required (or recommended) to comply with standardized social media card sizing of a 2:1 aspect ratio.

Learn more about CldOgImage on the Next Cloudinary Docs

Other Use Cases

❤️ Community & Support

🛠 Contributing

Please read CONTRIBUTING.md prior to contributing.

Working Locally

Installation

This project is currently using yarn as a way to manage dependencies and workspaces.

With the project cloned, install the dependencies from the root of the project with:

yarn install

Configuration

To work on the project, you need to have an active Cloudinary account. With the account, configure a .env.local file inside of docs with:

NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="<Your Cloudinary Cloud Name>"
NEXT_PUBLIC_CLOUDINARY_API_KEY="<Your Cloudinary API Key>"
CLOUDINARY_API_SECRET="<Your Cloudinary API Secret>"

Note: The Cloudinary account can be free, but some features may not work beyond free tier like Background Removal

The Cloud Name is required for all usage, where the API Key and Secret currently is only used for Upload Widget usage. The Upload Preset is additionally used for the Upload Widgets.

Uploading Example Images

In order to run the Docs project, you need to have the images referenced available inside of your Cloudinary account.

To do this, navigate to the scripts directory and first create a new .env file with:

CLOUDINARY_CLOUD_NAME="<Your Cloudinary Cloud Name>"
CLOUDINARY_API_KEY="<Your API Key>"
CLOUDINARY_API_SECRET="<Your API Secret>"

Then run the upload script with:

yarn upload

By default, the images inside of scripts/images.json will be uploaded to the "images" directory inside of your Cloudinary account. To change the location, add the CLOUDINARY_IMAGES_DIRECTORY environment variable with your preferred directory:

CLOUDINARY_IMAGES_DIRECTORY="<Your Directory>"

Running the Project

Once installed and configured, open two terminal tabs, navigating one to next-cloudinary and one to docs, running the following command in each:

yarn dev

The project will now be available at https://localhost:3000 or the configured local port.

Running Tests

All tests are located inside of next-cloudinary/tests with a directory structure that should reflect next-cloudinary/src.

While inside next-cloudinary, run tests with:

yarn test

Contributors

Colby Fayock
Colby Fayock

💻 📖 💡
Daniel Olavio
Daniel Olavio

💻
ramadevsign
ramadevsign

🔧
Karey Higuera
Karey Higuera

⚠️ 💻
Azanul Haque
Azanul Haque

🔧
3t8
3t8

📖
John Agbanusi
John Agbanusi

💻 📖
Joan León
Joan León

📖
Tim Benniks
Tim Benniks

💻 📖
csgochan
csgochan

📖
codingis4noobs2
codingis4noobs2

💻 ⚠️
michizhou
michizhou

💻
Lee Conlin
Lee Conlin

💻
Ryan Smith
Ryan Smith

💻
Michael Liendo
Michael Liendo

📖
Jack
Jack

💻

More Repositories

1

next-wordpress-starter

📝 Bring WordPress to the static world with Next.js
JavaScript
1,200
star
2

50-projects-for-react-and-the-static-web

⚛ 50 project ideas to learn by doing complete with project briefs, layout ideas, and resources!
861
star
3

gatsby-starter-leaflet

🍃 A Gatsby starter with Leafet to quickly build React apps with a map!
JavaScript
115
star
4

next-leaflet-starter

🍃 A Next.js starter with Leafet to quickly build React apps with a map!
JavaScript
102
star
5

html-webpack-partials-plugin

🛠 Easy HTML partials for Webpack without a custom index!
JavaScript
69
star
6

my-final-space-characters

Demo for spacejelly.dev tutorial
JavaScript
68
star
7

space-jelly-store-workshop

JavaScript
49
star
8

coronavirus-map-dashboard

🦠 Coronavirus (COVID-19) Map Dashboard using coronavirus-tracker-api
JavaScript
44
star
9

next-wpgraphql-basic-starter

JavaScript
42
star
10

use-custom-hook

⚛️ A starter template for creating a new React Hook
JavaScript
42
star
11

next-sass-starter

Use Sass to start your Next.js app with CSS superpowers!
JavaScript
40
star
12

cloudinary-examples

Easy Cloudinary integration examples for boosting web performance.
36
star
13

netlify-plugin-cloudinary

Supercharge images on your Netlify site with Cloudinary!
JavaScript
36
star
14

content-reminder

⏰ A GitHub Action that reminds you to share your own content
JavaScript
32
star
15

launchtime-workshop

JavaScript
32
star
16

gatsby-starter-sass

👓 A Gatsby starter with Sass and no assumptions!
JavaScript
31
star
17

colbyfayock.com

Personal blog using Next.js and headless WordPress
JavaScript
25
star
18

minimal.iOS.8

Minimal iOS 8 Winterboard theme
JavaScript
25
star
19

my-rick-and-morty-wiki

Demo for spacejelly.dev tutorial
JavaScript
23
star
20

imagecarbon

JavaScript
22
star
21

tweet

Netlify function to post a tweet to Twitter!
JavaScript
21
star
22

use-snipcart

A React hook for checking in to Snipcart state.
JavaScript
18
star
23

my-coronavirus-map

Demo for colbyfayock.com tutorial
JavaScript
17
star
24

my-futurama-characters

Demo for spacejelly.dev tutorial
JavaScript
16
star
25

spacejelly.dev

The best web dev tutorials in the galaxy!
HTML
16
star
26

my-posts-app

Demo for From Design to Development Crash Course
JavaScript
15
star
27

gatsby-starter-docz-netlifycms

Quickly deploy Docz documentation powered by Netlify CMS!
JavaScript
14
star
28

my-email-app

Demo for spacejelly.dev tutorial
JavaScript
14
star
29

gatsby-plugin-google-marketing-platform

Gatsby plugin for the Google Marketing Platform (GTM, GA, GO)
JavaScript
14
star
30

my-space-jelly-gear

Demo for egghead.io course
JavaScript
13
star
31

rick-and-morty-wiki

Demo for a tutorial walking through building a Rick and Morty Character Wiki in Next.js
JavaScript
13
star
32

my-scrolly-event

Demo for spacejelly.dev tutorial
JavaScript
13
star
33

my-husky-project

Demo for tutorial
JavaScript
12
star
34

use-placecage

A React hook for placecage.com
JavaScript
12
star
35

my-image-uploader

Demo for spacejelly.dev tutorial
JavaScript
12
star
36

my-spacex-launches

Demo for spacejelly.dev tutorial
JavaScript
12
star
37

my-openai-app

Demo for egghead.io course
JavaScript
11
star
38

hyper-bros-trading-workshop-github-universe

Learn how to build an online store with Next.js, Snipcart, and Netlify!
11
star
39

my-ecommerce-app

Demo for Level Up Tutorials course
JavaScript
11
star
40

minimal.iOS.9

Minimal iOS 9 Winterboard theme
JavaScript
11
star
41

my-react-email

Demo for spacejelly.dev tutorial
TypeScript
10
star
42

space-jelly-twitch-bot

JavaScript
9
star
43

gatsby-recipe-react-leaflet

🍃 A Gatsby Recipe for React Leaflet
JavaScript
9
star
44

santa-tracker

Demo mapping app for tracking Santa 🎅
JavaScript
9
star
45

next-redirect-manager

Dashboard for adding, removing, and viewing Vercel redirects.
JavaScript
9
star
46

space-jelly-gear-starter

JavaScript
9
star
47

my-next-mdx

Demo for spacejelly.dev tutorial
JavaScript
8
star
48

wwdc-memoji

Create your own WWDC Memoji!
JavaScript
8
star
49

cloudinary-util

JavaScript
8
star
50

md-to-wp

Upload a directory of markdown files to WordPress
JavaScript
8
star
51

cloudinary-transform-designer

Design your image transformation with Cloudinary
JavaScript
8
star
52

my-livebeat

Course demo for Full Stack React with Appwrite
TypeScript
8
star
53

my-cloudinary-images

Demo for spacejelly.dev tutorial
JavaScript
8
star
54

my-seo-app

Demo for spacejelly.dev tutorial
JavaScript
7
star
55

demo-image-upload-starter

https://demo-image-upload-starter.netlify.app
JavaScript
7
star
56

my-github-actions

Demo for spacejelly.dev tutorial
JavaScript
7
star
57

egghead-code-examples

Code examples for Egghead lessons
JavaScript
7
star
58

my-css-loading-animation-static

Demo for spacejelly.dev tutorial
HTML
6
star
59

demo-image-list-starter

JavaScript
6
star
60

cloudinary-pdf-viewer

POC for viewing a PDF programmatically with Cloudinary
JavaScript
6
star
61

my-nextauth-twitter

Demo for spacejelly.dev tutorial
JavaScript
6
star
62

demo-github-profile-starter

JavaScript
6
star
63

gats-bs

JavaScript
6
star
64

amazon-goldbox

Grabs and dumps Amazon's Goldbox RSS into an S3 bucket for affiliate usage
JavaScript
6
star
65

hyper-bros-trading-workshop

Learn how to build an online store with Next.js, Snipcart, and Netlify!
6
star
66

my-contact-form

Demo for spacejelly.dev tutorial
TypeScript
6
star
67

my-next-sass-app

Demo for tutorial
JavaScript
6
star
68

my-next-cloudinary

Demo for spacejelly.dev tutorial
JavaScript
6
star
69

my-puppeteer-function

Demo for spacejelly.dev tutorial
JavaScript
6
star
70

gatsby-starter-zurgbot

The ultimate force of starter awesomeness in the galaxy of Gatsby
JavaScript
5
star
71

thank-you-action

JavaScript
5
star
72

my-css-loading-animation-dynamic

Demo for spacejelly.dev tutorial
JavaScript
5
star
73

media-ecommerce-workshop

5
star
74

50reactprojects.com

JavaScript
5
star
75

space-jelly-store

JavaScript
5
star
76

my-fresh-blog

Demo for spacejelly.dev tutorial
JavaScript
5
star
77

my-next-eslint

Demo for spacejelly.dev tutorial
JavaScript
5
star
78

my-react-file-upload

Demo for spacejelly.dev tutorial
TypeScript
4
star
79

my-tagged-uploads

Demo for spacejelly.dev tutorial
JavaScript
4
star
80

astro-image-gallery

CSS
4
star
81

revue-convertkit-sync

Automatically sync Revue subscribers to Convertkit with GitHub Actions
JavaScript
4
star
82

my-tailwind-static

Demo for spacejelly.dev tutorial
HTML
4
star
83

my-pokemon-generator

Demo for spacejelly.dev tutorial
JavaScript
4
star
84

my-long-press

Demo for spacejelly.dev tutorial
JavaScript
4
star
85

hyper-bros-trading-workshop-starter

Starter for workshop Build an Online Store with Next.js, Snipcart, and Netlify
JavaScript
4
star
86

cloudinary-nextauthjs

JavaScript
4
star
87

my-tailwind-dynamic

Demo for spacejelly.dev tutorial
CSS
4
star
88

netlify-cms-editor-component-figure

Native HTML figure element for Netlify CMS
JavaScript
4
star
89

demo-next-function-starter

JavaScript
4
star
90

cloudycam

JavaScript
4
star
91

my-santa-tracker

Demo for colbyfayock.com tutorial
JavaScript
4
star
92

my-swapi-search

Demo for spacejelly.dev tutorial
JavaScript
4
star
93

my-search-events

Demo for spacejelly.dev tutorial
JavaScript
4
star
94

my-chakra-app

Demo for tutorial
JavaScript
4
star
95

space-jelly-cron

JavaScript
3
star
96

my-pinned-repos

Demo for spacejelly.dev tutorial
JavaScript
3
star
97

cloudinary-image-function

JavaScript
3
star
98

my-testing-app

Demo for spacejelly.dev tutorial
JavaScript
3
star
99

my-mapbox-gatsby-starter-leaflet

Demo for spacejelly.dev tutorial
JavaScript
3
star
100

my-last-airbender-wiki

Demo for spacejelly.dev tutorial
JavaScript
3
star