CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-gatsby-plugin-sharp

Wrapper of the Sharp image manipulation library for Gatsby plugins

58%

Overall

Evaluation58%

1.07x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-7/

Optimized Image Processor

Build a Node.js module that processes images with configurable quality and compression settings to optimize file sizes while maintaining acceptable visual quality.

Capabilities

Format-Specific Quality Control

  • When processing a JPEG image with quality set to 65, the output file size should be smaller than the default quality @test
  • When processing a PNG image with quality set to 80, the output should reflect the quality setting @test

PNG Compression Settings

  • PNG images processed with compression level 9 should produce smaller files than compression level 5 @test

Progressive JPEG Encoding

  • JPEG images should be encoded as progressive by default for better loading experience @test

Implementation

@generates

API

/**
 * Processes an image with quality and compression settings.
 *
 * @param {Object} options - Processing options
 * @param {string} options.inputPath - Path to the input image file
 * @param {string} options.outputPath - Path where the processed image should be saved
 * @param {number} [options.jpegQuality] - JPEG-specific quality setting (1-100)
 * @param {number} [options.pngQuality] - PNG-specific quality setting (1-100)
 * @param {number} [options.pngCompressionLevel] - PNG compression level (0-9)
 * @param {boolean} [options.progressive] - Enable progressive encoding for JPEG
 * @returns {Promise<Object>} Processing result with file size and format information
 */
async function processImage(options) {
  // Implementation here
}

module.exports = { processImage };

Dependencies { .dependencies }

gatsby-plugin-sharp { .dependency }

Provides image processing and optimization capabilities including quality control and compression settings.

@satisfied-by

tessl i tessl/npm-gatsby-plugin-sharp@5.15.0

tile.json