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-6/

High-Volume Image Processor

Build a Node.js command-line tool that efficiently processes a large directory of images by generating multiple optimized variants of each image. The tool must process images in batches to maximize throughput and minimize memory usage.

Requirements

Input

  • Accept a directory path containing source images (JPEG/PNG)
  • Accept an output directory path for processed images
  • Images should be at least 1920x1080 pixels

Output Variants

For each source image, generate three variants:

  1. Thumbnail: 200px wide, maintaining aspect ratio
  2. Medium: 800px wide, maintaining aspect ratio
  3. Large: 1920px wide, maintaining aspect ratio

All variants should be:

  • Saved as both WebP and JPEG formats
  • Compressed with quality setting of 50
  • Named using pattern: {original-name}-{size}.{ext} (e.g., photo-thumbnail.webp)

Performance Requirements

  • Process multiple images concurrently (use available CPU cores minus 1)
  • Generate all variants of a single source image together in one batch operation
  • Display processing progress showing: current file, completed count, total count, elapsed time

Command-Line Interface

node process-images.js --input ./source-images --output ./optimized-images

Test Cases

  • When processing a directory with 3 images, creates 18 output files (3 images × 3 sizes × 2 formats) @test
  • When processing with 4 CPU cores available, uses concurrency of 3 @test
  • Thumbnail variants are approximately 200px wide @test
  • Output files include both .webp and .jpg extensions @test

Dependencies { .dependencies }

gatsby-plugin-sharp { .dependency }

Provides high-performance image processing capabilities with Sharp library integration.

@generates

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

tile.json