Code-Parth/image-optimization ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Python tool that can take the images in my project and turn them into WebP files.
It should work on single files or whole folders, go through subfolders when I ask, and keep the same relative folder structure in the output. Please skip SVGs, already optimized WebP files, and anything unknown by default. I want it to be safe too, so don’t overwrite anything unless I explicitly say so.
Use ffmpeg with libwebp, and if that is missing, show me a clear message telling me what I need instead of trying to install things on its own. Add a dry run option, a lossless mode for logos and screenshots, and a quality setting for photos. It would also be great if it could print a simple before and after report with file sizes and total savings, and optionally write that report to JSON.
Are you gonna build this?
make sure you review the code using coderabbit