Wrapper of the Sharp image manipulation library for Gatsby plugins
Build a Node.js image processing tool that converts images between different formats with quality optimization.
@generates
/**
* Converts an image file to a specified output format.
*
* @param {string} inputPath - Path to the input image file
* @param {string} outputPath - Path where the converted image will be saved
* @param {Object} options - Conversion options
* @param {string} options.format - Target format: 'jpeg', 'png', 'webp', or 'avif'
* @param {number} [options.quality=50] - Quality setting (1-100)
* @param {Object} [options.jpegOptions] - JPEG-specific options
* @param {boolean} [options.jpegOptions.progressive=true] - Enable progressive encoding
* @param {Object} [options.pngOptions] - PNG-specific options
* @param {number} [options.pngOptions.compressionLevel=9] - Compression level (0-9)
* @returns {Promise<Object>} Object containing output file metadata
*/
async function convertImage(inputPath, outputPath, options) {
// IMPLEMENTATION HERE
}
module.exports = {
convertImage
};Provides image processing and format conversion capabilities.
@satisfied-by
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