Adding the "format" option

 - If the output path does not contain a file extension like
   .jpg or .png you can not specify the format you would like
   the thumbnail to be generated in