No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    can't display my svg file in image icon

    Framework
    icons image svg
    3
    4
    751
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      deer last edited by deer

      I placed my svg file in public folder & use the below command to display my image as an icon:

       <q-icon class="text-dark" size="lg" name="img:logo.svg"/>
      

      but the problem is that the icon is not displayed on my page.And I get the below error:
      (GET http://localhost:6006/logo.svg 404 (Not Found)).
      Does anyone knows what’s the solution?

      I 1 Reply Last reply Reply Quote 0
      • I
        Ilia @deer last edited by

        @deer try this one, works well 🙂

        https://quasar.dev/vue-components/icon#SVG-use-way

        D 1 Reply Last reply Reply Quote 0
        • D
          deer @Ilia last edited by

          @ilia I used the below command in another application while putting my file in public directory & it worked:

          <q-icon name="img:/logo.svg" style="font-size: 6em"/>
          

          but it still does not work in the application I explained above, don’t you think if the problem is from the configuration that it can not find the direction of file?

          dobbel 1 Reply Last reply Reply Quote 0
          • dobbel
            dobbel @deer last edited by dobbel

            @deer

            See here how to use a svg from static assets (public folder)
            https://quasar.dev/vue-components/icon#SVG-use-way

            <q-icon name="svguse:icons.svg#icon-1">
            
            1 Reply Last reply Reply Quote 0
            • First post
              Last post