ContentOptimizer

fun interface ContentOptimizer(source)

Optimizes raw vector markup content (SVG or AVG) before parsing.

This is the content-based counterpart to Optimizer, which operates on files via external CLI tools. Implementations process in-memory string content, for example by invoking SVGO's browser API in a web worker.

See also

Functions

Link copied to clipboard
abstract suspend fun optimize(content: String, fileType: FileType): String

Optimizes vector markup content for the given fileType.