3👍
I think I just overcame this problem with one of my projects with Django backend + React frontend. It is in your url patterns.
As I understand it, this catch-all pattern:
re_path('', TemplateView.as_view(template_name='index.html'))
essentially overrides the media url pattern you wrote (and any others below it), which prevents the Django backend from allowing you to access the media files. To fix this, simply make sure the catch-all route is the last one on your patterns. After you are done with the rest of the patterns, on a new line do this:
urlpatterns += [re_path('', TemplateView.as_view(template_name='index.html'))]
This way, you add it to your paths after all the rest and it doesn’t “block” any of the others. hopefully this fixes it!
Source:stackexchange.com