Skip to content

media files are not served in production

static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

is used only when DEBUG=True

to workaround it it should be something like:

re_path(r'^%s(?P<path>.*)$' % re.escape(settings.MEDIA_URL.lstrip('/')), serve, {'document_root': settings.MEDIA_ROOT})