Primary preprocess_link, preprocess_image functions
Additions to link and image preprocess