optimize
Checks the type of file (SVG or AVG) and invokes the correct optimization process using the appropriate optimization tools.
Return
The Path object of the optimized file.
Parameters
file
A Path object that represents the file which optimization process is to be performed upon.