Netlify Image CDN 400 Error with Remote Images
Current Configuration
// nuxt.config.ts
image: {
provider: 'netlify',
dir: 'public',
domains: [
'bf.inverizo.com',
'https://bf.inverizo.com/',
'https://bf.inverizo.com/storage/',
'https://bf.inverizo.com/storage/products/',
],
alias: {
storage: 'https://bf.inverizo.com/storage',
products: 'https://bf.inverizo.com/storage/products',
},
}
Issue Description
I’m experiencing 400 errors when trying to load remote images through Netlify Image CDN. The images are hosted on bf.inverizo.com
and are being served from paths like /storage/products/...
. While static images in the public
directory work fine, remote images consistently return 400 errors.
Usage Examples
<!-- Working: Static image from public directory -->
<NuxtImg
src="/images/logo.png"
alt="Logo"
/>
<!-- Not Working: Remote image -->
<NuxtImg
src="https://bf.inverizo.com/storage/products/list_image_656/01JNZJYE3D683ECYCP18P5DWYM.jpg"
alt="Product Image"
/>
<!-- Not Working: Using alias -->
<NuxtImg
src="/products/list_image_656/01JNZJYE3D683ECYCP18P5DWYM.jpg"
alt="Product Image"
/>
Error Details
- Image URL example:
https://bf.inverizo.com/storage/products/list_image_656/01JNZJYE3D683ECYCP18P5DWYM.jpg
- Generated Netlify Image CDN URL:
/.netlify/images?w=10&h=10&q=50&blur=3&url=https%2F%2Fbf.inverizo.com%2Fstorage%2Fproducts%2Flist_image_656%2F01JNZJYE3D683ECYCP18P5DWYM.jpg
- Error: 400 Bad Request
What I’ve Tried
- Different domain configurations in
nuxt.config.ts
:- Using full URLs with paths
- Using just the domain
- Using regex patterns
- Using different URL formats in the image source
- Checking if the remote images are accessible directly (they are)
- Using both direct URLs and aliases
- Verifying that static images in the public directory work correctly
Environment
- Nuxt 3
- Netlify Image CDN
- Deployed on Netlify
- Local development using Netlify CLI
Additional Context
- The images work fine locally
- The issue only occurs in production
- Static images (from public directory) work correctly
- Remote images are publicly accessible
- Both direct URLs and aliases fail with the same 400 error
- The issue seems to be specific to remote image handling in production
Expected Behavior
- Static images from public directory should work (✓ working)
- Remote images should be optimized and served through Netlify Image CDN (✗ failing)
- Both direct URLs and aliases should work for remote images (✗ failing)
Any help or guidance would be greatly appreciated!