For GIF images, there will be a small "Optimizing.." message on top-left of the image to indicate that the script is checking the raw version for that image. The message will automatically disappear when it's done.
The image will be replaced with the raw version if it's available. Otherwise, if the image (width) is less than 1280px, it will be replaced with the 1280px version (the maximum Tumblr predefined image size). Else, the image will not be changed.
This script has been tested using TamperMonkey on Firefox ESR and Chromium.