made permalink the canonical ref for get_link
further simplified resize/external functions