compatible with MEDIA_URL settings in both ways of http://example.com/media/ or /media/