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;
}