collect-assets icon indicating copy to clipboard operation
collect-assets copied to clipboard

SVG Support With image()

Open DogeDark opened this issue 1 year ago • 2 comments

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.

DogeDark avatar Apr 04 '24 22:04 DogeDark

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" ?

rambip avatar Apr 12 '24 08:04 rambip

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

ealmloff avatar Apr 12 '24 17:04 ealmloff