Reputation: 4405
How can I convert an svg
file to webp
using Android Studio?
I don't see any convert to webp option when right clicking on the xml file and when I tried an online converter it produced 1 webp file while I was expecting a file for each definition folder drawable-*dpi
Also I don't see how I could import the webp
in the project if I converted it from another tool.
Upvotes: 2
Views: 4625
Reputation: 360
SVG is a vector graphic where WebP is a raster graphic. These graphic types are not compatible. You first need to convert the SVG to some sort of raster graphic. You can do this by simply taking a screen shot of the image. Then convert the screenshot from what ever raster format (usually PNG) to WebP.
Upvotes: 2