From 758ec420888cbb2325f6c7a9a33dfe827e445bd8 Mon Sep 17 00:00:00 2001 From: Ben Hong Date: Fri, 11 Jun 2021 10:15:08 -0400 Subject: [PATCH] docs: clarify src origin (#318) * docs: clarify src origin * docs: add static docs reference --- docs/pages/en/2.components/1.nuxt-img.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/pages/en/2.components/1.nuxt-img.md b/docs/pages/en/2.components/1.nuxt-img.md index 783bb7893..68f9f9124 100644 --- a/docs/pages/en/2.components/1.nuxt-img.md +++ b/docs/pages/en/2.components/1.nuxt-img.md @@ -11,6 +11,8 @@ description: Discover how to use and configure the nuxt-img component. - Generates responsive sizes when providing `sizes` option - Supports native lazy loading as well as other `` attributes +## Usage + `nuxt-img` outputs a native `img` tag directly (without any wrapper around it). Use it like you would use the `` tag: ```html @@ -23,6 +25,16 @@ Will result in: ``` +### File Location + +Images should be stored in the `static` directory. + +For example, the `nuxt-icon.png` referred to in the previous example should be placed in `static` folder under the path `/static/nuxt-icon.png`. + +In other words, image stored in the `assets` directory are not compatible with Nuxt Image because those images are managed by webpack. + +For more information, you can learn more about the [static directory here](https://nuxtjs.org/docs/2.x/directory-structure/static). + ## Props ### `src`