can you modify so that the image being saved is compressed a lot to save size the most but also at the same time the viewbility should not be that decreases the main goal should be slighly viewable by the user and save it the cloduinary and save that url use that url instead of saving it locally 
"""
// services/screenshotService.js

const fs = require('fs');
const path = require('path');
const puppeteer = require('puppeteer');
const logger = require('../utils/logger');

// Directory to store screenshots
const SCREENSHOT_DIR = path.join(__dirname, '../screenshots');

// Ensure the screenshots directory exists
if (!fs.existsSync(SCREENSHOT_DIR)) {
    fs.mkdirSync(SCREENSHOT_DIR, { recursive: true });
    logger.info(`Created screenshots directory at ${SCREENSHOT_DIR}`);
}

// Initialize Puppeteer browser instance
let browserInstance = null;

const initBrowser = async () => {
    if (!browserInstance) {
        browserInstance = await puppeteer.launch({ args: ['--no-sandbox'] }); // '--no-sandbox' for environments like Heroku
        logger.info('Puppeteer browser launched');
    }
    return browserInstance;
};

// Function to take a screenshot
const takeScreenshot = async (url) => {
    try {
        const browser = await initBrowser();
        const page = await browser.newPage();

        // Set a reasonable viewport size
        await page.setViewport({ width: 1280, height: 800 });

        // Attempt to navigate to the URL
        await page.goto(url, { waitUntil: 'networkidle2', timeout: 30000 }); // 30 seconds timeout

        // Generate a unique filename based on timestamp and URL
        const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
        const sanitizedUrl = url.replace(/[^a-zA-Z0-9]/g, '_');
        const filename = `${sanitizedUrl}_${timestamp}.png`;
        const filepath = path.join(SCREENSHOT_DIR, filename);

        // Capture the screenshot
        await page.screenshot({ path: filepath, fullPage: true });

        await page.close();

        logger.info(`Screenshot saved to ${filepath}`);
        return `/screenshots/${filename}`; // Relative URL
    } catch (error) {
        logger.error(`Error taking screenshot for ${url}: ${error.message}`);
        throw error;
    }
};

module.exports = {
    takeScreenshot,
};
"""
"""
// config/cloudinary.js

const cloudinary = require('cloudinary').v2;
const dotenv = require('dotenv');

dotenv.config();

cloudinary.config({
    cloud_name: process.env.CLOUDINARY_CLOUD_NAME,
    api_key: process.env.CLOUDINARY_API_KEY,
    api_secret: process.env.CLOUDINARY_API_SECRET,
});

module.exports = cloudinary;
"""
// cloudinary.js

const cloudinary = require('cloudinary').v2;
const dotenv = require('dotenv');

dotenv.config();

cloudinary.config({
  cloud_name: process.env.CLOUDINARY_CLOUD_NAME,
  api_key: process.env.CLOUDINARY_API_KEY,
  api_secret: process.env.CLOUDINARY_API_SECRET,
});

module.exports = cloudinary;
""
and i gues this should be used with some multer maybe not idont know it shiuld be functionaling and perfectly working as fuck 
"""
"""
PORT=3000
MONGODB_URI=mongodb+srv://durgesh:<PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>/notifyme
JWT_SECRET=durgesh
CLOUD_NAME=dovhcyq7m
CLOUDINARY_API_KEY=373831899932147
CLOUDINARY_API_SECRET=dIikZ0fCJhOUV1GLkCiWF6ChMK8
<PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>
EMAIL_PASS=rtsauiwjfusfgqsd