==== What is the problem?
When using the WhoWroteThat tool on an article, any images which linked to Commons have their links changed to the local counterpart.
For example, https://commons.wikimedia.org/wiki/File:Nasa_brazil_fires_20190820.jpg gets changed to https://es.wikipedia.org/wiki/Archivo:Nasa_brazil_fires_20190820.jpg.
There seems to be at least two bugs here:
1. The WhoColor API returns marked-up HTML with the image links changed (I will raise a bug on the [[ https://github.com/wikiwho/WhoColor | WhoColor GitHub ]]. EDIT: actually, this might be our [[ https://www.mediawiki.org/wiki/API:Parsing_wikitext | own API ]])
2. Even if the WhoColor API returns an error, and therefore does not return its marked-up HTML, after closing the WWT tool the image links get changed. This looks more like a bug on our side.
From experimenting, the <a> element has its href changed. The <img> element appears untouched.
Therefore, I don't think the images as they appear on the page will be changed. Just where you go when you click on them.
==== Steps to reproduce problem
Install the extension using the [[ https://github.com/wikimedia/WhoWroteThat#testing-the-browser-extension | instructions ]].
1. Go to https://es.wikipedia.org/wiki/Incendios_de_la_selva_amaz%C3%B3nica_de_Brasil_de_2019
2. Click on any image on the page, see it goes to https://commons.wikimedia.org
3. In the left sidebar, click "Who Wrote That?"
4. If WWT reports an error, close the infobar at the top
5. Click on the same image you clicked on in step 2
**Expected behavior:** Takes you to https://commons.wikimedia.org
**Observed behavior:** Takes you to https://es.wikipedia.org
**Browser:** Chromium 73, Firefox 60
Some wikis can display images from [[ https://www.mediawiki.org/wiki/Manual:Image_administration#Foreign_Repositories | foreign repositories ]], such as Commons. This appears quite common on https://es.wikipedia.org.