collect-assets
collect-assets copied to clipboard
SVG Support With image()
Specific Demand
The capability to use SVG images with the image() function in manganis:
const DIOXUS_LOGO: manganis::ImageAsset = manganis::mg!(image("./assets/dioxus_color.svg"));
// instead of
const DIOXUS_LOGO: &str = manganis::mg!(file("./assets/dioxus_color.svg"));
While it works with file(), one could assume to use image() and end up confused like me.
What if the library gave an error like "the mg!(image(...)) macro can only be used for matrix images. Svg is a vector image, so use mg!(file()) instead" ?
There are cases where treating svgs as images is nice. Images contain options for low quality image previews which would be nice to support for svgs as well with something like this