-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Directus provider not working #1423
Comments
I have the same error when using strapi: nuxt.config.js ...
image: {
format: ['avif'],
providers: {
strapi: {
baseURL: process.env.NUXT_ENV_SITE_BACKEND_URL, // Has http://127.0.0.1 value
},
},
},
... But my NuxtPicture, NuxtImg and useImage still generates: |
Hi guys! Anybody here who can fix this? Definitely seems like a bug to me right? |
For anybody encountering the same, for now I use without a provider like this: <NuxtImg
v-if="settings?.auth_cover_image"
:src="filePath(settings?.auth_cover_image, '?width=2000')"
:placeholder="filePath(settings?.auth_cover_image, '?width=10')"
loading="lazy"
class="absolute inset-0 h-full w-full object-cover"
/> My export function filePath(file: DirectusFile, transformations?: string, format: string | null = 'webp') {
let queryStr = transformations
if (!file.filename_download || !file.id) { return null }
if (queryStr && format) {
queryStr = `${queryStr}&format=${format}`
}
else if (format) {
queryStr = `?format=${format}`
}
else {
queryStr = ''
}
return `${useRuntimeConfig().public.apiHost}/assets/${file?.id}/${encodeURIComponent(file?.filename_download)}${queryStr}`
} This works perfectly fine as well.... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
Using
"@nuxt/image": "^1.7.0" and
"nuxt": "^3.12.4", I have the following setup for nuxt image:
nuxt.config.ts`:A page with the following content:
However, when I view the frontend I get the following error:
GET http://localhost:3000/45200248-cebf-4d57-b7f5-aee8f2351289 404 (Page not found: /45200248-cebf-4d57-b7f5-aee8f2351289)
and[Vue Router warn]: No match found for location with path "/45200248-cebf-4d57-b7f5-aee8f2351289"
The file is there, when I view
http://localhost:8055/assets/45200248-cebf-4d57-b7f5-aee8f2351289.jpeg
in my browser it shows the file.....Whats up here?
The text was updated successfully, but these errors were encountered: