What worked for me was removing the image element from the DOM and then recreating it with a new source using JavaScript. When I had tried to simply reassign the image's src attribute using JavaScript, it didn't work.