image
image copied to clipboard
ipx server on 0.2.x
The new alphas aren't spinning up an ipx server or generating any images from local dirs. Are changes to nuxt.config necessary to enable this (vs v0.0.4) or is one supposed to host ipx somewhere else? I'm using the stock prefs:
image: {
static: {
clearCache: false,
cacheDir: "~~/node_modules/.cache/nuxt-img",
dir: "~/assets/uploads",
sharp: {}
}
}
I'm also struggling with this issue. Also trying to serve images from local static dir but not managing to get IPX to work as expected.
Placeholders are only generated when using nuxt-picture but not when using nuxt-img on v.0.2.x, and with nuxt-picture it says type=image/webp
but the actual webp image doesn't get generated, only the jpeg version.
Hi. Usage of hosted ipx with 0.2 is optional and via it's own provider. This is to make sure @nuxt/image
remains a buildModule and IPX is properly/explicitly deployed on a server with enough resources (sometimes it is better if hosted separately and set via baseURL specially for serverless environments). Will update docs in short for this :)
Also please please notice image module is under development and opensourced to get early feedbacks but API is not stable yet so please do not use it for production.
Thank you for clarifying this.
Having it embedded works great with netlify when building automatically from a git repo, so it'd be really nice to still have that option.
Hi @pkpowell Actually this option should remain when deploying to static hostings like Netlify via static provider :) I guess it is not working now since we have some regressions. Will keep issue posted.
Awesome, thanks.
This should now be closed by https://github.com/nuxt/image/pull/257 - if using in production make sure to follow docs at https://image.nuxtjs.org/providers/ipx#using-ipx-in-production. Let me know if you still encounter issues and I'll reopen.
@danielroe I still have problem with /static/images
when deploy to netlify. The server can't found image /_ipx/...
. I wanna use /_nuxt/
but follow the documentation that's seem not work.
@danielroe I still have problem with
/static/images
when deploy to netlify. The server can't found image/_ipx/...
. I wanna use/_nuxt/
but follow the documentation that's seem not work.
I'm running into the same issue. Any subdirectory pages, ie: /blog/page/2 won't load imagery. However root level pages, ie: /photography works fine.
@tusamni @vienpt I'll look into it. Could you let me know what your image configuration is?
@tusamni @vienpt I'll look into it. Could you let me know what your image configuration is?
Images are located in static/images/
Module config:
image: {
staticFilename: '[publicPath]/images/[name]-[hash][ext]',
dir: 'static/images'
},
I'm loading them with a custom component from content like this;
<Photo
src="/pages/home/eriksolsen.jpg"
:width="2000"
:height="3000"
alt="The Mystery Spot - Santa Cruz, CA"
classes="shadow-xl lg:rounded-md"
sizes="xs:100vw lg:1024px"
format="webp"
:show="true"
/>
@danielroe I still have problem with
/static/images
when deploy to netlify. The server can't found image/_ipx/...
. I wanna use/_nuxt/
but follow the documentation that's seem not work.
the same issue for me too, is there any solution?
@danielroe I still have problem with
/static/images
when deploy to netlify. The server can't found image/_ipx/...
. I wanna use/_nuxt/
but follow the documentation that's seem not work.I'm running into the same issue. Any subdirectory pages, ie: /blog/page/2 won't load imagery. However root level pages, ie: /photography works fine.
Have same issue
same issue with 0.6.0
Still getting this issue in 0.7.1
. Images stored in my static folder are appearing in development but in production the _ipx/_/
image paths are giving 404s.
I'm using version 0.7.0
and I still have the same issue. Both in production and in development
I was having the same problem. When you deploy your application on Netlify and the build command is executed, for some reason the dist directory was not being generated on the Netlify server. I replace:
"build": "nuxt build"
with
"build": "nuxt build && nuxt generate"
.
The generate command works the same as the build command, but causes the dist to be generated. It worked for me!
having the same issue with nuxt 3. even trying to change the dir config for ipx it's trying to get ipx// but the images are present are the root folder.
Maybe the doc is not clear enough and what we should do ?