HomePhabricator

Load image with direct URL

Tags
None
Referenced Files
None
Subscribers
None

Description

Load image with direct URL

Instead of loading the image via Special:FilePath, get its URL (in a
single API request together with the attribution, using the split
functions introduced in the previous commit) and use that as the src for
the <img>. This skips several redirects and also allows CORS (the file
response has CORS headers, but the redirects don’t), which we’ll need
soon. We still use Special:FilePath for the srcset, though, because
there’s no way (yet) to get multiple thumbnail URLs in one request.

Details

Provenance
LucasWerkmeisterAuthored on Oct 19 2019, 5:18 PM
Parents
R2422:bf7902add783: Add functions to get image URL
Branches
Unknown
Tags
Unknown
ChangeId
None