Let photon handle https images.

Closes #1808 
Includes a new test.
cc @koke cos I recall you were interested in photon supporting https. 
I think  I was trying to closely match what was there previously.  I do like checking the scheme better in this case.