A
A
Alexander Osadchy2021-03-05 16:49:04
React
Alexander Osadchy, 2021-03-05 16:49:04

Nextjs + Strapi - How to fix media links?

Hello!

I'm making a blog on nextjs - we decided to do it on strapi

Everything works, everything is fine - but there is one question - links to media when publishing a post

Now everything is local:

Website: localhost:3000/blog
Strapi: localhost:1337

Here is a screen where I add a picture to the record:
6042363f20995127784088.jpeg

And since a link without a domain - it does not work in the blog, because it looks for a folder on the side of the site, and not straps - how can this be fixed?

Link in post now: localhost:3000/uploads/1...png

Should be: localhost:1337/uploads/1...png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question