How To Remove Anchor Links When Adding Images to your blog

Posted by Lasantha Bandara on May 21st, 2009 File Under : image0 Comment

When you add an image into your blog,it has a link(anchor link). When you click on the image, you will be directed on a page that only displays the image. For example, click the image below to better understand .

This image has a Anchor Link(Blogger Default feature);

HTML Code of the above image :

<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://2.bp.blogspot.com/_ar9PeTUrwMY/ShUNuSwljVI/AAAAAAAAAek/K8PGg02JEow/s1600-h/FeedBurner-256x256.png"><img style="cursor: pointer; width: 256px; height: 256px;" src="https://2.bp.blogspot.com/_ar9PeTUrwMY/ShUNuSwljVI/AAAAAAAAAek/K8PGg02JEow/s400/FeedBurner-256x256.png" alt="" id="BLOGGER_PHOTO_ID_5338188022278360402" border="0" /></a>

If you want to remove Anchor Link of your image you must remove below parts of the above code.

<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://2.bp.blogspot.com/_ar9PeTUrwMY/ShUNuSwljVI/AAAAAAAAAek/K8PGg02JEow/s1600-h/FeedBurner-256x256.png">

                                                And

</a>

Now final code look like this.

<img style="cursor: pointer; width: 256px; height: 256px;" src="https://2.bp.blogspot.com/_ar9PeTUrwMY/ShUNuSwljVI/AAAAAAAAAek/K8PGg02JEow/s400/FeedBurner-256x256.png" alt="" id="BLOGGER_PHOTO_ID_5338188022278360402" border="0" />

Now click on the picture below.It hasn't a Anchor Link.

It should not be clickable anymore.

File Under : image

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.