Skip to main content

Module media

Module media 

Source
Expand description

Optional WebP conversion for Nomad Network media responses.

Temporary files are owned by the conversion call. The returned bytes belong to the Resource, so disconnects cannot leave link-owned spool directories.

Structs§

ConversionOptions
Encoding controls for standalone file conversion.

Functions§

convert_file_to_webp
Convert a file into an owned temporary WebP file, removed when dropped. The source is never modified; unavailable backends or conversion failures return None. Call persist on the returned file to retain it permanently.