Next.js Discord

Discord Forum

Change Next/Image URL

Unanswered
Western yellowjacket posted this in #help-forum
Open in Discord
Western yellowjacketOP
I am loading an image from my Strapi rest api and I can see the url of my Strapi domain in the served image.

Right now image urls look something like this:

websitedomain.com/_next/image?url=https%3A%2F%2Fstrapidomain.com%2image.png&w=640&q=75

I don't want to expose the domain of my Strapi server though.

Any ideas on how to hide/change the url?

I'm using Vercel as my website host and Digital Ocean for Strapi (not sure if relevant)

1 Reply

kinda weird suggestion that i haven't tested (and would kinda slow down first req), but can you create a rewrite for a relative url to that subdomain, and then point your next/image to that?