Skip to content Skip to sidebar Skip to footer

RemlinkJS


What's RemlinkJS?

RemlinkJS is an optimized JavaScript line that helps to remove hyperlink from the blog post images. By using RemlinkJS, you are allowed to remove the hyperlinks whether from all blog post images or specific blog post images.

By default, Blogger has set a hyperlink to every image uploaded in the post or page. The reason behind this hyperlink behind the image is that to allow the readers to see the image in its original size. This is useful for tutorial blog or wallpaper blog where only thumbnails are displayed. By allowing the readers to see the image in its original size, the texts in the image become more readable.

RemlinkJS v2 changelog:

  1. JQuery-based since modern Blogger templates are using JQuery.
  2. Adding Lazy Loading feature to speed up page loading.
  3. Easier configuration since the code is more readable than RemlinkJS vs1.

Read article about RemlinkJS

How to install RemlinkJS v2 to Blogger?

It is very simple.

  1. Get the RemlinkJS from this page;
  2. Copy it (copy all of it!) and make necessary adjustments
    • If you want to remove hyperlink from all blog post images, change the value of var divClass =  from remlink to separator.
    • If you just want to remove hyperlink from certain blog post images, leave the var divClass=remlink.
    • Set the value of var lazy = ; you have three options. If you set the value of lazy to "yes", then only the image under the remlink class will be added lazy loading. If you set the value to "all" (recommended), then all the images in your blog will be added lazy loading. If you set it to "no", then lazy loading will not be added to any image.
  3. Put the code just above the </body> tag;
  4. Save your blogger template.

RemlinkJS Code v2 (JQuery)

<script> $(document).ready(function(){ var lazy = "all"; var divClass = "remlink"; if(lazy==="yes"){ $("."+divClass).find("a").removeAttr("href"); $("."+divClass).find("img").attr("loading","lazy"); }else if(lazy==="all"){ $("."+divClass).find("a").removeAttr("href"); $("img").attr("loading","lazy"); }else{ $("."+divClass).find("a").removeAttr("href"); } });</script>

RemlinkJS Code v2 (No JQuery)

<script> var divClass = "remlink"; var lazy = "yes"; var getImgDiv = document.getElementsByClassName(divClass); for(var nx=0;nx<getImgDiv.length;nx++){ var getHyp = getImgDiv[nx].getElementsByTagName("a")[0]; getHyp.removeAttribute("href"); var getImg = getImgDiv[nx].getElementsByTagName("img")[0]; if(lazy === "yes",lazy === "all"){ getImg.setAttribute("loading","defer"); }else{ getImg.setAttribute("loading","lazy"); } } </script>

RemlinkJS Code v1

//<![CDATA[
var divClass="remlink";for(var a=document.getElementsByClassName(divClass),b=0;b<a.length;b++)if(a[b].hasChildNodes())for(var c=a[b].childNodes,d=0;d<c.length;d++)c[d].removeAttribute("href");
//]]>

How to use RemlinkJS?

If you use RemlinkJS to remove hyperlink from all blog post images, then once you installed it, hyperlink in your all blog post images have been automatically removed.

If you use RemlinkJS to remove hyperlink from certain blog post images, then follow these steps:

  1. Find the post where you want to remove the hyperlink of the image;
  2. Edit the post via HTML view or code editor;
  3. Locate the <div class='separator'...> this is the container of the image. Make sure that it is the image that you want to remove the hyperlink;
  4. Add remlink after the separator so it looks like <div class='separator remlink'...>
  5. Do this to every image that you want to remove the hyperlink from;
  6. Save the post.

Does RemlinkJS affect the blog load time?

During our test and use of RemlinkJS, it does not show that the blog page load time is affected. So, it does not hurt your blog SEO.

Is RemlinkJS safe?

Yes. RemlinkJS is safe. It is written in naked JS code. There is no encrypted part in the code so there is no worry to use RemlinkJS. No malware in RemlinkJS.