Remove check for wp_get_image_mime()
Remove check for wp_get_image_mime()

I tried to call get_post() as late as possible, for better performance. But then I saw that wp_get_attachment_url() calls get_post() anyways, so it doesn’t really matter. By moving get_post() further to the top, we can use the post_mime_type property of the attachment instead fo the wp_get_image_mime() function. This seems to work better, because it doesn’t have to use the URL of the image, but a local file path. Using the URL could lead to an error with SSL certificates on localhost.

MINDKomm/Timmy