fix media plugin for dynamic urls