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.
To use Context7 with IMG Processing, you can follow these steps:
Install the Context7 MCP Server: Check out the Installation Guide
for detailed instructions on how to set up the Context7 in your preferred environment.
Prompt the AI: Use the context7 tool in your AI development agent to provide the necessary context. End your prompt with use context7.
Copy
Create a function that uses IMG Processing to resize an image to 200x200 pixels. use context7
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:
Copy
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;}