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.

The creation of picture tag files is not yet implemented but in our pipeline.

Installation

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

Modules

core

Contains default functions and traits.

fs

Functions operating on the filesystem that is required for html5_picture Contains supporting functions that alter the file system.

path

Path processing that is required for html5_picture

utils

Generic helper functions.

webp

Support for webp format. Used mainly for conversion.

Functions

collect_png_file_names

Collects all png file names that are stored in the input_dir.

is_png

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