Optimized images generated in local env well. but in build env, lost optimized images. Are there any solutions?
I use nuxt ver 2.14.7 and @nuxt/image 0.6.0 for my application.
my nuxt.config.js
target: 'static',
image: {
provider: 'static',
}
vue file
<nuxt-img :src="origin image link"
provider="static"
width="270px"
height="270px"
alt=""/>
It worked well in local env, but when I run build, optimized images losted.
And requested url is "~~~/_ipx/s_270x270/images/airports/LAX.jpg"
I want to display optimized images with static provider.
Did I miss any attributes? or Are there any solutions?
We're getting the same issue with nuxt 2.15.8, @nuxt/image0.6.2 node 16.16.0, linux OS. Had to use an alias as we were getting IPX Error: TypeError: Only absolute URLs are supported on production but the images are not optimised. We've tried the serverMiddleware from https://image.nuxtjs.org/providers/ipx#advanced-custom-servermiddleware but the images still aren't optimising.
Update: downgrading to @nuxt/image 0.5.0 fixed the optimisation