I am not entirely familiar with Tumbler, but I am willing to bet there is a unique class name for those image blocks. You can insert JavaScript on Tumbler as well. see: http://www.problogtricks.com/2013/12/add-custom-css-javascript-code-to-tumblr-blog.html
That said, randomizing elements with JavaScript is super easy. Here is a demo of how that is done. After identifying a unique classname that applies only to those elements, you can change the parameter inside the JavaScript function below.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style>
.putauniqueclassnamehere{
}
</style>
<script src="jquery-1.11.2.min.js"></script>
<script>
$(document).ready(function (name) {
return function () {
var max = $(name).length;
$.each($(name), function (p1, p2) {
var randPos = Math.floor(Math.random() * (max - 0 + 1) + 0);
$(p2).insertBefore($(name)[randPos]);
})
return ;
}
}(".putauniqueclassnamehere"))
</script>
</head>
<body>
<div class="mytest">Test 1</div>
<div class="mytest">Test 2</div>
<div class="mytest">Test 3</div>
<div class="mytest">Test 4</div>
<div class="mytest">Test 5</div>
</body>
</html>