# Assets

It has the external resources that templates may need, such as images, stylesheets and some JavaScripts.

The assets folder on build stagging / prod will be sent to CDN with some hash.

To nuxt compile the assets links with the rigth use require.


# Image handle

Always use the getImage method!

# Why ?

  • He is build to fetch from correct baseURL (CDN for production / odoo others)
  • He is already injected in vue

# How ?

   // from template
   $image( <image url> )

   // from setup
   { url: root.$image(img.small) }

# Example 1

    v-for="product in products"

# Example 2

    :alt="icon.name || 'icon-image'"