What is Context7?

LLMs rely on outdated or generic information about the libraries you use. Context7 pulls up-to-date, version-specific documentation and code examples directly from the source. Paste accurate, relevant documentation directly into tools like Cursor, Claude, or any LLM. Get better answers, no hallucinations and an AI that actually understands your stack.

How to use Context7 with IMG Processing?

To use Context7 with IMG Processing, you can follow these steps:
  1. Install the Context7 MCP Server: Check out the Installation Guide for detailed instructions on how to set up the Context7 in your preferred environment.
  2. Prompt the AI: Use the context7 tool in your AI development agent to provide the necessary context. End your prompt with use context7.
Create a function that uses IMG Processing to resize an image to 200x200 pixels. use context7
  1. AI Response: The AI will respond with a code snippet that uses the IMG Processing SDK to resize an image. Example of an AI response:
import { ImgProcessing } from 'img-processing-sdk';
import { ImageObject } from "img-processing-sdk/resources";

async function resizeImage200x200(imageId: string): Promise<ImageObject> {
    const client = new ImgProcessing({
        apiKey: process.env.IMG_PROCESSING_API_KEY,
    });

    // Assuming the SDK provides a resize method (refer to your SDK docs for exact method signature)
    const resizedImage = await client.images.resize(imageId, {
        width: 200,
        height: 200,
        fit: 'cover', // or 'contain', depending on your needs
    });

    return resizedImage;
}