Requires {% load static %}
Add {% load static %} near the top of any template that
uses {% get_media_prefix %}. Without it Django does not
know the name and raises TemplateSyntaxError.
The MEDIA_URL counterpart to get_static_prefix, for uploaded files rather than the ones you ship.
Template
{% load static %}
<script>const MEDIA = "{% get_media_prefix %}";</script>
Result
<script>const MEDIA = "/media/";</script>
For a FileField you almost always want {{ obj.file.url }} instead, which already includes the prefix.
