Figure out how to do CORS.
Right now we don't make a CORS request for the image. This means that we will never be able to auto-detect grids for URL-based images. We could set
<img crossorigin> which will allow us to auto-detect for images that support CORS unfortunately (and contrary to the docs) this attribute will cause non-CORS images to fail! This means that not-only we can't auto-detect but we also don't show the image to the user for manual clicking.
The ideal solution would be something that loads a tainted image when CORS isn't support (like we always do now) but load an untainted image if CORS is supported. I can maybe do this with two requests but I want to make sure that this doesn't add too much latency to the image load. There is a good chance that the second request will be cached but it will take some testing to be sure.