charge/image
Values
pub fn percent_encode(p: String) -> String
pub fn with_image_optimization(
pipeline: charge.Pipeline(a, b),
static_images_dir: fs.Path,
) -> charge.Pipeline(a, b)
Optimize all images that can be resolved within the HTML using sharp. Images are converted to WEBP
Images are resolved with respect to the static_images_dir provided or the current HTML file’s source
and put into the /optimized-images path in the pipeline’s output
Additionally it will append the following attributes to the element:
orientationofhorizontalorverticalaspect-ratio