image icon indicating copy to clipboard operation
image copied to clipboard

Hi, I am trying to get NuxtImg going with CloudFlare images. https://image.nuxt.com/providers/cloudflare

Open ICTLAYER opened this issue 1 year ago • 4 comments

Hi, I am trying to get NuxtImg going with CloudFlare images. https://image.nuxt.com/providers/cloudflare It says on the docs about baseURL Your deployment's domain (zone). meaning I have to connect my website domain to CloudFlare, like zones?

I am using Vercel's automatically assigned domain name for now. It is not possible to change DNS afaik. So does it mean I can't test my website on local or just dev environment?

Or is it just https://imagedelivery.net/<account_id>? Even if I do this, for some reason, the image url becomes: /https://imagedeliver... It adds a '/'.

Also on docs, it shows only the image name as src: src="/burger.jpeg", does it mean this part: /<account_id>/<image_id>/public`?

Is there an example?

If possible, and if this gets resolved I want to open a PR for docs.

Originally posted by @onurusluca in https://github.com/nuxt/image/discussions/1491

ICTLAYER avatar Oct 16 '24 13:10 ICTLAYER

### ### More as example an to example prove to myself: prove myself with respect:

Not Working: https://nuxtimgtest.pages.dev/cdn-cgi/image/7mnVjFJmJT6C1-RIIlFtQg/cf0cac91-0a0e-4c86-c376-60597e37e700/public

Working: https://nuxtimgtest.pages.dev/cdn-cgi/imagedelivery/7mnVjFJmJT6C1-RIIlFtQg/cf0cac91-0a0e-4c86-c376-60597e37e700/public

@oritwoen @danielroe @renovate-bot @pi0 @atinux

ICTLAYER avatar Oct 16 '24 13:10 ICTLAYER

Thanks for pointing this out again. This needs to be cleared up. I searched about this for 2 days and I gave up. Hopefully someone knows. Cloudflare's docs aren't good. It's says you need to create a namespace, connect domain or something. I was so lost.

onurusluca avatar Oct 16 '24 13:10 onurusluca

I found certain sections challenging to follow, which may impact the ease of implementation for users. Specifically, it seems that some concepts and instructions could benefit from further elaboration or examples. Improving the clarity and structure would greatly enhance the user experience and reduce potential confusion. Like what type of image source is required to use this provider. Is it third-party image source or my own Cloudflare's images ?

nafiz6629 avatar Oct 17 '24 05:10 nafiz6629

https://image.nuxt.com/providers/cloudflare Cloudflare Nuxt Image has first class integration with Cloudflare. This documentation does not provide proper information about Cloudflare integration with nuxt image

masud-ictlayer avatar Oct 17 '24 05:10 masud-ictlayer

Hi, I am trying to get NuxtImg going with CloudFlare images. https://image.nuxt.com/providers/cloudflare It says on the docs about baseURL Your deployment's domain (zone). meaning I have to connect my website domain to CloudFlare, like zones?

I am using Vercel's automatically assigned domain name for now. It is not possible to change DNS afaik. So does it mean I can't test my website on local or just dev environment?

Or is it just https://imagedelivery.net/<account_id>? Even if I do this, for some reason, the image url becomes: /https://imagedeliver... It adds a '/'.

Also on docs, it shows only the image name as src: src="/burger.jpeg", does it mean this part: /<account_id>/<image_id>/public`?

Is there an example?

If possible, and if this gets resolved I want to open a PR for docs.

Originally posted by @onurusluca in #1491

hey did you find a solution on this? i spent my whole day to find a way to make it work, nothing worked

tahirmahmudzade avatar Nov 08 '24 11:11 tahirmahmudzade

Here is how I was able o resolve this, hope it helps: https://github.com/nuxt/image/issues/805#issuecomment-2483628222

ymansurozer avatar Nov 18 '24 17:11 ymansurozer