Requires updating webserver URL rewrite urls to support PNGs
Caching requires explicitly defining a caching context with the name "sv-svg-img" or "css".
Supports Imagick or CLI executables as a back-end to render SVGs to PNGs. Using Imagick is not recommended
Example using resvg, as a CLI-executable back-end;
/usr/local/bin/resvg --quiet {sourceFile} {destFile}
This requires compiling using Rust, or use the pre-compiled linux x86_64 binary here.
Compiling can be done with;
Code:
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
cargo install resvg
cp ~/.cargo/bin/resvg /usr/local/bin/resvg
chmod +x /usr/local/bin/resvg