Skip to main content
Photo of DeepakNess DeepakNess

Optimizing 1,300+ Images using 'sharp'

I found out about the "sharp" image library when I was migrating my website from WordPress to 11ty, as it was mentioned somewhere on the 11ty documentation page. And coincidentally, only a few days later, I had to optimize over 1,300 images for a project and I immediately moved to using sharp.

I even created a GitHub repository (have named it OptiSharp) and have put all the code there. You can also watch this quick video to understand how it works.

How OptiSharp works

OptiSharp is a simple tool that makes your images smaller and better for the web. Here's how it works:

#1. Put your images in: Just drop all your images into the input folder.

#2. Choose your settings: You can easily change a few settings like:

#3. Run the tool: Type one command, and it will:

#4. Get results: After it's done, you'll see:

Why I made this

I needed to make lots of images smaller for websites, and doing it one by one was taking too long. Most online tools:

OptiSharp solves these problems because it:

How to use it

  1. Make sure you have Node.js on your computer
  2. Download OptiSharp from GitHub
  3. Put your images in the input folder
  4. Run the program
  5. Get your optimized images from the output folder

It's that simple! The tool will show you how much space you saved and if there were any problems.

What's next?

I'm planning to add more features like:

If you want to try OptiSharp, visit the GitHub page and follow the instructions. It's free and open for everyone to use and improve!