Render Non Standard Image Types in SharePoint WebPart (.tiff etc)

A simple way to make use of the SharePoint API that will allow you to render non standard image types in browsers, such as .tiff when creating your own WebParts.

Replace the following parts of the link with the necessary company name, and relative URL to the image.

https://{COMPANY}.sharepoint.com/_api/v2.0/sharePoint:{IMAGE_SERVER_RELATIVE_URL}:/driveItem/thumbnails/0/large/content?preferNoRedirect=true

eg:

https://mycompany.sharepoint.com/_api/v2.0/sharePoint:/site/myDocumentLibrary/1.tiff:/driveItem/thumbnails/0/large/content?preferNoRedirect=true

Note: the above doesn't work with list item attachments, it 404's.