Is there anyway of setting MIME types in the django development server? Specifically, I would love to remove this message from the warnings in Chrome dev tools.
Resource interpreted as Image but transferred with MIME type image/x-png
Turns out it was as simple as adding
if DEBUG:
import mimetypes
mimetypes.add_type("image/png", ".png", True)
to settings.py
来源:https://stackoverflow.com/questions/16303098/django-development-server-and-mime-types