5.4 fix url regex for only accept media

If we don't use ^ at the start of the regex, the user could reach the image in any url that contain media/

Ex:

http://localhost:8000/media/rango.jpg
http://localhost:8000/text/media/rango.jpg
http://localhost:8000/any_text/media/rango.jpg