How to add SVG icons to Xano?
![Nelson Marteleira](https://us.v-cdn.net/6037124/user_avatars/4613527.jpg)
Sorry if this is a basic question, but I could not find information about this anywhere.
I have a categories table where I need to add SVG icons, but when I try to add them to the storage/image field, it does not allow me to select SVG files.
Do I need to use a different field type for SVG?
Comments
-
Svgs are all text- you could store the body directly in a field in your table. Is that a useful option for you?
-
I guess in the end everything is text @Ray Deck ;). And then numbers …
—-
I assume that attachments also work for SVG, right? -
Any file can be attached - including SVG files. You don't get the metadata that goes with images or videos, but that should be fine.
SVGs because they are 1) small and 2) made of text (as opposed to JPGs, which are binary) are also candidates to store directly in the database rather than in the file storage system without ceremony. So both techniques work -
Hi @Ray Deck
How to save the SVG on the text field? I just copy and past and only have the SVG title not the icon I wish to display.
Maybe I'm doing something wrong.
Regards
Gustavo S
-
SVG is just text - it looks a lot like HTML. Then when you put it in the context of your web page, the browser renders it into an image. That text basis is what makes it a good fit for storing in a string field in a database.
-
I trying to put inside an App and not working like a webpage.
-
Doesn't matter how you will use it - the SVG is still just a string. Try downloading one from, say, wikipedia, and then open it with your preferred text editor. Because it is a string, you can store it in a text field. The consumer - web browser, Swift app on iOS, whatever - will be responsible for taking the list of instructions and turning them into the visual representatino you are going for.
-
Hi Ray, for some reason it didn’t worked in Flutterflow when I run on iOS. I change the text field and put a image in png format and worked.
Appreciate your support.
Gustavo
-
I am in exactly the same situation and facing the same problem, were you able to find a solution?
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback