Eleventy Plugin Sharp Images screenshot

Eleventy Plugin Sharp Images

Updated: 2 Aug 2025
11 Stars

Overview

The Eleventy plugin for Sharp Images brings powerful image processing capabilities to static sites built with Eleventy. Designed to optimize assets efficiently, this plugin enhances website performance by leveraging the full potential of the Sharp library. It offers a straightforward solution for cropping, resizing, compressing, and converting file types within Eleventy projects. Brought to life by CodeStitch as a successor to the discontinued eleventy-plugin-sharp, this tool ensures that your images are not only stunning but also optimized for speed.

Whether you’re deploying to a platform like Netlify or managing a local build, this plugin has a robust caching mechanism that prevents identical images from being regenerated unnecessarily. With its asynchronous processing abilities, even the non-asynchronous features blend seamlessly, allowing for a smooth and efficient workflow.

Features

  • Full Sharp Integration: This plugin fully integrates Sharp’s capabilities, allowing for various image manipulations such as cropping, resizing, and file type conversion directly in your Eleventy project.

  • Efficient Caching Mechanism: Prevents the regeneration of identical images across builds, significantly speeding up the build process both locally and when deployed to services like Netlify.

  • Asynchronous Processing: Supports non-asynchronous features, ensuring smooth performance even when utilizing templates like Nunjucks Macros for image handling.

  • User-Friendly Configuration: Adjust settings easily with options for URL paths, output directories, caching strategies, and automatic EXIF orientation correction to ensure that images are rendered correctly.

  • Responsive Image Support: Features the ability to generate responsive images with various source elements, allowing for tailored resolutions in different formats such as AVIF, WebP, and JPEG.

  • Transformation Flexibility: Offers a straightforward syntax for applying Sharp transformations through filters, providing a simple yet powerful way to adjust image properties.

  • Enhanced Output Control: Allows users to specify dimensions, quality values, and the desired output format, ensuring complete control over how images are processed and displayed on the site.