Closed Framsynt closed 2 years ago
Oh, just noticed that whole MyImage
return
is wrong too.
@Framsynt I don't think we can provide a reliable setup for local development in the example. We can consider adding a note that additional changes are necessary for local development. How does it sounds to you?
Note:
For local development you can enable [Resize images from any origin checkbox](https://developers.cloudflare.com/images/image-resizing/enable-image-resizing/) against your zone and return an absolute URL path:
return `https://<yourdomain.com>/cdn-cgi/image/${paramsString}/${normalizeSrc(src)}`;
👌
Closing. Addressed in https://github.com/cloudflare/cloudflare-docs/pull/4531
Existing documentation URL(s)
- link(s) to existing https://developers.cloudflare.com/... pages
Section that requires update
Next.js
What needs to change?
this does not work with local development 'yarn dev' etc.
How should it change?
add
if (process.env.NODE_ENV === 'development')
or similar solution.Additional information
Any other details or screenshots that may be relevant.