amp-library icon indicating copy to clipboard operation
amp-library copied to clipboard

Set the correct scheme to transform the img tag

Open blauerberg opened this issue 7 years ago • 2 comments

fix #213

blauerberg avatar Jan 19 '18 04:01 blauerberg

@blauerberg looks good. Can you create a test for this as well?

SGudbrandsson avatar Jan 19 '18 09:01 SGudbrandsson

hmm, this problem will occured only below condition:

  • img tag that has relative path, and does'nt have 'width', 'height' attribute

In this case, it will access the image with "http" scheme to get 'width', 'height' of image even if original access is https.

But upload.wikimedia.org seems to redirect http to https. Maybe we need the some URI that just accept only 'https' for test.

blauerberg avatar Jan 21 '18 14:01 blauerberg