const src = './raw-photos'; const dest = './web-photos'; const maxW = 1600;

| Flag | Purpose | |------|---------| | -resize 1600 | Scales the image so the longer side becomes 1600 px; height adjusts automatically. | | -strip | Removes EXIF metadata (GPS, camera info) that isn’t needed for the web. | | -interlace Plane | Creates a progressive JPEG that loads gradually. | | -quality 80 | Sets compression quality (adjustable). | | -strip + -interlace together improve perceived load speed. |

Develop a feature for an application that automatically resizes images, organizes them based on customizable criteria (like date, size, or resolution), and provides a quick search function.

# Example usage image_path = 'path/to/your/image.jpg' output_path = 'path/to/save/resized_image.jpg' resize_image(image_path, output_path, size=(800, 600)) # Resizing to 800x600