Secure way of uploading php images and GIF
Your code is insecure because:

It only relies on the file extension, so attackers can upload any backdoors.
It accesses variable $_FILES['postToUpload']['name'] without checking if it is defined and this may lead to Full Path Disclosure.
It uses function uniqid() without any arguments, so uniqueness is not guaranteed and the files that are uploaded simultaneously and have the same file name will be overwritten.
It stores the filename provided by user without removing potentially dangerous characters and this may lead to unexpected results.

Some recommendations to improve your code:

Get rid of the $uploadOk variable. You already have and handle the $errorMessage variable and this is enough to check if the file was uploaded successfully.
You should define $imageFileType as lowercase, instead of calling strtolower() for each extension.
You should define all accepted file extensions as lowercase, otherwise users won't able to upload some files (in your case WebM and Ogg, because strtolower($imageFileType) != &quot;Ogg&quot; and strtolower($imageFileType) != &quot;WebM&quot; will always be FALSE).