Fix to image permalink functionality.