Rejiggering js to be a bit smarter about what it selects as image-fix