Disable links to images only if link is an image

Posted by Prem Tiwari | Updated on

I am not a professional when it comes to regular expressions but this should be able to catch all linked images which the href attribute links to an image file ((png|jpg|gif|jpeg|bmp) feel free to add/remove extensions):


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers