There are many different ways to specify the format or convert one format to another while uploading to Cloudinary.
Uploading from the Media Library- This can be done by setting the allowed format field under upload preset. By setting this field to a specific format you are ensuring that only the given list of formats can be uploaded, others will be rejected.
If you do not want to restrict formats but instead prefer to convert one format to another on upload then this can be done by setting it in the "Format" field of upload preset. Eg: If a gif is uploaded it will automatically be converted to a png file.
Uploading from the Upload Widget- You can specify the acceptable formats under "clientAllowedFormats". More information here: https://cloudinary.com/documentation/upload_widget#upload_widget_options
Uploading from the API- Format restriction is also supported when uploading from the API by using the "allowed_format" parameter. This post outlines it with a few examples: https://support.cloudinary.com/hc/en-us/articles/202520802-How-can-I-allow-only-certain-file-formats-for-uploads-