Skip to main content

Modifying Images in Blogger CSS Templates

Erika Smith from the Wedding Blog sent a question about hosting images for the Blogger Template. I am posting the reply here since it will benifit all blogspot.com users who are not comfortable modifying CSS templates that include links to web images.

Erika's Question: How or where do I add a web hosted image to a blogger or free blog template? I understand HTML but all the templates I am working with are CSS.

Erika, there are three steps involved here:

Step 1: Download the Blogger Template with the associated image files. You can easily find tons of free but professional looking blog template designs on the web.

Step 2: Upload the images files to the web. While there are tons of free Image Hosting Websites like PhotoBucket or ImageShack, I would recommend only the following sites for blogspot.com users:

  » googlepages.com - create a directory called blog_assets and under it, a new directory called images. Upload all the images to this directory using the web image uploader. [Recommended when you have just a couple of image files to upload]

  » picasaweb.google.com - create a new public Picasa web album called Blog Assets and upload your blogger images via the Picasa desktop client. [Recommened when you have way too many pictures to upload]

  » blogger.com - compose a new blog post, upload images via the "Add image" button and then save the post as a Draft. Don't publish the post. This is actually a hack for uploading images to blogger.com server, using the image url and then deleting the original post. In doing so, the images are not deleted by blogspot server. [Recommened only when the above two services are not accessible to you]

All the three services will give you a unique URL that directly points to the full-size version on the web. Keep it handy. Also, don't use Flickr for uploading Blog Template Images since their policy requires you to link back to the original Flickr image. [Flickr vs Picasa]

Step 3: This is last but the most important step - you will actually replace the image file names with the actual image URLs

Open your template and select the entire text using the mouse or pressing Ctrl+A - Now paste that in a new notepad session.

Press Ctrl+F and type .jpg or .gif or .png - this is to determine the locatioin of the image in the template if it is large in size. You will reach text like the one below:

#main {
width:485px;
background:#fff url("corners_main_bot.jpg") no-repeat;
margin:15px 0 0;
}
#main3 {
background:url("rails_main.gif") repeat-y;
padding:0;
}
Now all you have to do is replace these image file names with the real location. So after search-n-replace, the new Blogspot template will looks something like below:

#main {
width:485px;
background:#fff
url("http://blogger.com/corners_main_bot.jpg") no-repeat;
margin:15px 0 0;
}
#main3 {
background:url("http://google.com/rails_main.gif") repeat-y;
padding:0;
}
Once you finished replacing all the image file name, copy-paste the modified template back to the Blogger Template page and do a preview before saving the template. If the preview layout looks as expected, click save and republish everything.

Quick Tip: Try to include the height and width attributes when you include images in your blog posts. This decreases the rendering time since the browser gets the information beforehand.

Popular posts from this blog

How to Download Contacts from Facebook To Outlook Address Book

Facebook users are not too pleased with the "walled garden" approach of Facebook. The reason is simple - while you can easily import your Outlook address book and GMail contacts into Facebook, the reverse path is closed. There's no "official" way to export your Facebook friends email addresses or contact phone numbers out as a CSV file so that you can sync the contacts data with Outlook, GMail or your BlackBerry. Some third-party Facebook hacks like "Facebook Sync" (for Mac) and "Facebook Downloader" (for Windows) did allow you to download your Facebook friends' names, emails, mobile phone number and profile photo to the desktop but they were quickly removed for violation of Facebook Terms of Use. How to Download Contacts from Facebook There are still some options to take Friends data outside the walls of Facebook wall. Facebook offers the Takeout option allowing you to download all Facebook data locally to the disk (include

Digital Inspiration

Digital Inspiration is a popular tech blog by  Amit Agarwal . Our popular Google Scripts include  Gmail Mail Merge  (send personalized emails with Gmail ),  Document Studio (generate PDFs from Google Forms ) and   File Upload Forms ( receive files  in Google Drive). Also see  Reverse Image Mobile Search , Online Speech Recognition and Website Screenshots , the most useful websites on the Internet.

PhishTank Detects Phishing Websites by Digg Style Voting

OpenDNS, a free service that helps anyone surf the Internet faster with a simple DNS tweak , will announce PhishTank today. PhishTank is a free public database of phishing URLs where anyone can submit their phishes via email or through the website. The submissions are verified by the other community members who then vote for the suspected site. This is such a neat idea as sites can be categorized just based on user feedback without even having to manually verify each and every submission. PhishTank employs the "feedback loop" mechanism where users will be kept updated with the status' of the phish they submit either via email alerts or a personal RSS feed . Naturally, once the PhishTank databases grows, other sites can harness the data using open APIs which will remain free. OpenDNS would also use this data to improve their existing phishing detection algorithms which are already very impressive and efficient. PhishTank | PhishTank Blog [Thanks Allison] Related: Google