Update Media.php

Adding setExtension to change extension.
It is inpossibile to have images in, for example, jpg if you have png source.