I think we can combine our solutions here, actually. Try one of these scripts.
If you don't have multiple gif's in the same passage, but do have multiple gif's across the story, try this:
postdisplay['gif-reloader'] = function (t) {
var source = $('img#graph').attr('src');
$('img#graph').attr('src', source + '?' + Date.now());
};
Assuming every gif has the ID 'graph', this code will pull the src attribute and reassign it when the passage is rendered, every time.
If you need to have multiple gif's in the same passage, things get a bit more messy, but not by too much. Try this:
postdisplay['gif-reloader'] = function (t) {
var el = $('img.gif-reload').toArray();
var i, source;
for (i = 0; i < el.length; i++) {
var source = $(el[i]).attr('src');
$(el[i]).attr('src', source + '?' + Date.now());
}
};
For this one, you'll need to give each gif you want to replay the class 'gif-reload'.