from django.urls import re_path
from django.views.static import serve
from django.conf import settings
urlpatterns = [
...
re_path(
r"^api/static/(?P<path>.*)$",
serve,
kwargs=dict(document_root=settings.STATIC_ROOT),
)
]