6.5.2 • Published 2 days ago

next-cloudinary v6.5.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 days ago

Next Cloudinary

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

FeaturesGetting StartedCommunity & SupportContributing

This is a community library supported by the Cloudinary Developer Experience team.

✨ 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:
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 using pnpm as a way to manage dependencies and workspaces.

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

pnpm 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:

pnpm 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:

pnpm 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:

pnpm test

Contributors

6.5.2

2 days ago

6.5.1

21 days ago

6.5.0

26 days ago

6.4.1

29 days ago

6.4.0

30 days ago

6.3.0

2 months ago

6.2.1

2 months ago

6.1.1

2 months ago

6.2.0

2 months ago

6.1.0

2 months ago

6.0.1

2 months ago

6.0.0

2 months ago

6.0.0-beta.9

3 months ago

6.0.0-beta.15

2 months ago

6.0.0-beta.14

3 months ago

6.0.0-beta.13

3 months ago

6.0.0-beta.12

3 months ago

6.0.0-beta.11

3 months ago

6.0.0-beta.10

3 months ago

6.0.0-beta.19

2 months ago

6.0.0-beta.18

2 months ago

6.0.0-beta.17

2 months ago

6.0.0-beta.16

2 months ago

6.0.0-beta.7

3 months ago

6.0.0-beta.8

3 months ago

6.0.0-beta.3

4 months ago

6.0.0-beta.4

4 months ago

6.0.0-beta.6

4 months ago

5.20.0

4 months ago

5.19.0

4 months ago

6.0.0-beta.1

4 months ago

6.0.0-beta.2

4 months ago

5.18.0

4 months ago

5.17.0

4 months ago

5.17.0-beta.4

4 months ago

5.15.0

5 months ago

5.17.0-beta.1

5 months ago

5.16.0

5 months ago

5.17.0-beta.3

5 months ago

5.17.0-beta.2

5 months ago

5.13.0-beta.1

5 months ago

5.14.1

5 months ago

5.14.0

5 months ago

5.13.0

5 months ago

5.12.0-beta.2

5 months ago

5.12.0-beta.1

5 months ago

5.12.0

5 months ago

5.11.0

5 months ago

5.3.0

6 months ago

4.25.0

7 months ago

4.26.0

7 months ago

5.8.0

5 months ago

5.4.0

6 months ago

5.0.0

6 months ago

4.24.0

7 months ago

4.24.1

7 months ago

5.9.0

5 months ago

5.5.1

6 months ago

5.5.0

6 months ago

5.1.0

6 months ago

4.23.0

7 months ago

4.23.1

7 months ago

4.28.0

7 months ago

5.6.0

6 months ago

5.2.0

6 months ago

5.10.0

5 months ago

4.22.1

7 months ago

4.27.0

7 months ago

5.7.0

6 months ago

4.21.0

8 months ago

4.22.0

8 months ago

4.18.1

9 months ago

4.16.3

10 months ago

4.14.1

10 months ago

4.16.0

10 months ago

4.16.1

10 months ago

4.18.0

9 months ago

4.16.2

10 months ago

4.10.1

12 months ago

4.12.0

12 months ago

4.14.0

10 months ago

4.19.0

8 months ago

4.15.0

10 months ago

4.17.0

9 months ago

4.17.1

9 months ago

4.20.0

8 months ago

4.11.0

12 months ago

4.13.0

11 months ago

4.13.1

10 months ago

4.9.0

1 year ago

4.9.1

1 year ago

4.4.0

1 year ago

4.6.0

1 year ago

4.10.0

1 year ago

4.8.0

1 year ago

4.5.0

1 year ago

4.7.0

1 year ago

1.12.3

1 year ago

1.12.2

1 year ago

1.12.0

1 year ago

1.8.2

1 year ago

2.2.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

3.4.0

1 year ago

3.2.0

1 year ago

3.0.0

1 year ago

4.0.1

1 year ago

4.0.0

1 year ago

4.0.3

1 year ago

4.2.0

1 year ago

4.0.2

1 year ago

1.11.0

1 year ago

1.9.0

1 year ago

2.3.0

1 year ago

2.1.2

1 year ago

2.1.1

1 year ago

2.3.2

1 year ago

2.3.1

1 year ago

2.1.0

1 year ago

3.3.0

1 year ago

3.1.0

1 year ago

4.1.0

1 year ago

4.3.0

1 year ago

4.1.1

1 year ago

1.8.3

1 year ago

1.10.0

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.7.0

1 year ago

1.6.0

1 year ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

0.1.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.9.0

1 year ago

0.8.0

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.7.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago