Wrapper of the Sharp image manipulation library for Gatsby plugins
Build a simple image thumbnail generator that processes images at multiple sizes for a responsive web application.
Create a module that generates multiple thumbnail sizes from a source image. The module should:
/**
* Generates thumbnail images at multiple widths
* @param {Object} file - Source image file node
* @param {Object} reporter - Reporter instance for logging
* @returns {Promise<Array>} Array of thumbnail results with metadata
*/
async function generateThumbnails(file, reporter);Each result object in the returned array should contain:
width: The width of the generated thumbnailheight: The height of the generated thumbnailsrc: Path to the generated thumbnail fileaspectRatio: The width/height ratio@generates
Provides image processing and resizing capabilities.
tessl i tessl/npm-gatsby-plugin-sharp@5.15.0docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10