Adds check for image size and content type for the image replacement of links. Adds "show preview" link next to the image link if the preview of the images is disabled. Patch provided by Marin Dzhigarov on dev mailing list (subject: "PATCH: Replacement of Image/Video links").