How To Use A Custom Image For LinkedIn Share Button

On 4th February, I posted some guidelines on how to use a custom image for Tweet button. Today we’ll discuss how to use a custom image of your choice to create LinkedIn button for your website. There are many reasons why a site owner may want to use his/her own image for the social buttons on his/her website. That said, as follows is how to customize your LinkedIn button:

You’ll most likely prefer to send updates to LinkedIn via a pop-up window, instead of opening a new browser tab or window. So, first of all, add the following JavaScript code to the Head section of your HTML page between the <head> and </head> tags:

  • <!– Begin LinkedIn pop-up JavaScript –>
    <script language=”javascript” type=”text/javascript”><!–var win=null;

    function NewWindow(mypage,myname,w,h,scroll,pos){



    else if((pos!=”center” && pos!=”random”) || pos==null){LeftPosition=0;TopPosition=20}


    // –>


    <!– End LinkedIn pop-up JavaScript –>

The function of the above JavaScript code is to open a pop-up window, whenever someone clicks on your LinkedIn button. Now let’s go over to styling your custom LinkedIn button.

Copy and paste the following HTML code on the exact spot you want the button to appear:

  • <a href=”” rel=”nofollow” onclick=”NewWindow(this.href,’template_window’,’550′,’400′,’yes’,’center’);return false” onfocus=”this.blur()”> <img src=”YourCustomImageURLGoesHere” title=”Share on LinkedIn” alt=”Share on LinkedIn” width=”35″ height=”35″ border=”0″ /> </a>

Please, change “YourDomainNameGoesHere” with the actual URL of the page you want to share with your contacts on LinkedIn. Change “TheTitleOfYourWebPageGoesHere” to whatever text you want to appear as the title of the page whenever you share it on LinkedIn. Also change “TheSummaryOfYourWebPageGoesHere” to whatever you want as a short description of the web page. Change “TheNameOfYourSiteGoesHere” to the actual name of your website like “SEO Treats” or even a targeted keyword. Lastly, change “YourCustomImageURLGoesHere” to the actual URL of the custom image you want to use for your button.

That’s it, folks! You can see that I set the width of the pop-up window to 550px and the height to 400px. To check out the button in action, visit our Nigerian computer supply website and click on the floating LinkedIn icon on the right side of the page. How do you like those social buttons on that site? We designed that technology website. If you ever want to have an online presence that best portrays your brand, or want to integrate customized social buttons to your existing website, please, don’t hesitate to contact FlamyTech Web Developer.

Related Article: How To Use Custom Image For Tweet Button