Build a Python script for automated image optimization and WebP conversion — Development Task