Crate html5_picture[][src]

Purpose and usage

Supports the binary within this package. Contains functions to easily generate different sizes of a picture that is used on webpages. Also offers the possibility to convert them into webp format and is able to create a <picture> tag for the given images.

Currently this crate is only capable of converting png files to webp using cwebp. So make sure that webp is installed on your computer.

Installation

The binary can be installed via cargo install html5-picture. As stated before, make sure webp is installed before using.

Modules

webp

Support for webp format. Used mainly for conversion.

Functions

create_output_dir

Creates the output directory on the filesystem.

get_output_dir_name

Generates the output directory name.

is_png

Determines if the given input filename contains a .png extension.