In the case of ALA GBIF reports the following domain: images.ala.org.au example how that URL directs to ala-images.s3.ap-southeast-2.amazonaws.com/ . The latter is also used as domain in the allow list on Commons.
How do you fetch a redirected URL in javascript?