Nuxt3 component NuxtImg #1081
Replies: 1 comment
-
I have the same issue, opened an issue and waiting for reply.. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
hi
I have a demo project.(nuxt 3.8.0)
I followed the steps below to install the
Nuxtimg
component.1.
pnpm add @nuxt/image
2.
export default defineNuxtConfig({ modules: [ '@nuxt/image', ] })
3. add an file(color.jpg) to the public directory
/public/color.jpg
4.
<template> <NuxtImg src="/color.jpg"/> </template>
5. run the demo
pnpm run dev
when the project is running, open the browser.
in the Browser Elements tab
<img src="/_ipx/_/color.jpg" data-nuxt-img="" srcset="/_ipx/_/color.jpg 1x, /_ipx/_/color.jpg 2x">
but in the Browser Source code tab,the
_ipx
folder does not exist.so the image on the page can't be displayed.
Have I done something wrong?
Thank you for your appreciate help.
Beta Was this translation helpful? Give feedback.
All reactions