image_optimizer/optimization/mod.rs
1//! Image optimization functionality.
2//!
3//! This module provides format-specific image optimization capabilities for JPEG, PNG, WebP, and SVG
4//! formats. Each optimizer uses specialized libraries for maximum compression efficiency:
5//!
6//! - **JPEG**: Uses mozjpeg for superior compression compared to standard libjpeg
7//! - **PNG**: Uses oxipng with zopfli for advanced compression algorithms
8//! - **WebP**: Uses Google's WebP encoder with both lossy and lossless modes
9//! - **SVG**: Uses regex-based optimization to remove metadata and unused elements
10//!
11//! The main entry point [`optimize_image`] automatically selects the appropriate optimizer
12//! based on file extension and coordinates the optimization process.
13
14pub mod image_optimizer;
15pub mod jpeg_optimizer;
16pub mod png_optimizer;
17pub mod svg_optimizer;
18pub mod webp_optimizer;
19
20pub use image_optimizer::optimize_image;