Next.js and Bunny CDN: Complete Guide to Image Uploading with Server Actions

This page summarizes the projects mentioned and recommended in the original post on dev.to

SurveyJS - JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor
Keep full control over the data you collect and tailor the form builder’s entire look and feel to your users’ needs. SurveyJS works with React, Angular, Vue 3, and is compatible with any backend or auth system. Learn more.
surveyjs.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. next-bunny-cdn

    Next.js and Bunny CDN: Using server actions for image uploading

    Since the tutorial focuses only on image uploading, server actions and using bunny CDN, I won't make a full guide on set up. You can either clone the repository or just setup everything by yourself in the way you like. Just make sure you have a Next.js with app router ready to use before diving deeper 😉

  2. SurveyJS

    JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor. Keep full control over the data you collect and tailor the form builder’s entire look and feel to your users’ needs. SurveyJS works with React, Angular, Vue 3, and is compatible with any backend or auth system. Learn more.

    SurveyJS logo
  3. nanoid

    A tiny (124 bytes), secure, URL-friendly, unique string ID generator for JavaScript

    Last thing left is to use our new upload function in our server action. Since I like to upload images in single format and have some more control over them, I will additionally use sharp library. For file name, I'll generate some random string using nanoid:

  4. valibot

    The modular and type safe schema library for validating structural data 🤖

    I'll use Valibot library, which is a pretty new and cool library for schema validation, similar to Zod.

  5. sharp

    High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.

    Last thing left is to use our new upload function in our server action. Since I like to upload images in single format and have some more control over them, I will additionally use sharp library. For file name, I'll generate some random string using nanoid:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Creating Image Optimizer With Rio

    3 projects | dev.to | 6 Dec 2022
  • How to create and serve image blur placeholders

    1 project | dev.to | 25 Jun 2025
  • Why Single Function Lambdas is a terrible choice for Serverless development.

    1 project | dev.to | 6 Apr 2025
  • NPM outage around CamelCase or more broad?

    2 projects | news.ycombinator.com | 1 Apr 2025
  • Thumbnail Generation for Images and Videos using AWS Lambda

    1 project | dev.to | 22 Mar 2025

Did you know that JavaScript is
the 3rd most popular programming language
based on number of references?