-
Notifications
You must be signed in to change notification settings - Fork 256
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
define base domain other then localhost #137
Comments
In the upcoming version you will be able to specify which domains you want to accept |
sound good, thanks. |
@pixelpaulaus Input URLs for IPX, can be either relative (served from static dir) or a URL. Do you want to host resizer service instead of locally starting ipx with |
@pixelpaulaus Any update on your use-case? |
@danielroe It would be good if you can add a remote image without having to specify the domain as it is not the best way in terms of SEO. Maybe you could pass a default domain to nuxt/image, which is used if no domain is specified? |
URL shortening with default domain seems a good use case. (I've escalated this to unjs/ipx#32). Still, we need to specify domains in For non SEO purposes (clean/dynamic code), we can use presets to define baseURL. Example: https://codesandbox.io/s/lively-feather-uwhmz //nuxt.config
export default {
buildModules: ["@nuxt/image"],
image: {
domains: ["https://picsum.photos"],
presets: {
picsum: {
baseURL: "/_ipx/https://picsum.photos/id/"
}
}
}
}; <template>
<main>
<nuxt-img preset="picsum" src="10/500" />
</main>
</template> |
Server alias support added in 0.5.0. See documentation: https://image.nuxtjs.org/api/options#alias |
how can i change it so it does not fetch the image via localhost, but instead a specified domain/IP?
The text was updated successfully, but these errors were encountered: