Tuesday, September 13, 2011

How to Create an Image Button (Technical Tuesday)

Today, I'm going to teach you how to turn a book cover into a clickable button you can give to your fellow bloggerites blogarians your posse. Don't worry if you don't have a book cover. You can use these steps to create any kind of clickable image for an award or special giveaway.

Rebecca Talley asked, "How can I make a button with an image of my book that others can put on their blogs?"

Quick Steps

I've created a tool to help you. Just fill in the form on the left and click Generate. You can preview your button in the middle section. If it looks good, copy the HTML code from the right and paste it into your website or blog. Done. By the way, you can make changes to the form and regenerate as many times as you want, so go ahead and play around.

(Note: This form may not work in an RSS reader. You'll have to visit the blog to use it.)


Settings
Image URL
Link URL
Message
Options:

Show Message

Show Copy Text Box


Preview

Code
Enter the details for your button. Preview your button.

Be careful when clicking on the button, it will take you away from this page (just like your real button will).
Copy and paste the code into your blog or website. Enjoy.

Longer Steps

If the tool didn't work for you (or you want more information), don't worry--I got your back. I'm going to cover all the steps you need to do to make your button.

Find Your Image

First, you're going to need an image. Follow the instructions on my previous post to find and re-size your image. Your final image should probably be between 125 pixels and 175 pixels wide. If you are unsure what size you need, try 150 pixels.

Since Rebecca asked the question we're going to use the book cover of her latest release The Upside of Down. Here it is:


Post Your Image Online

Your image needs to be publicly available online.

The very best place for it is hosted with your website, but different companies have different ways to get files on the internet. If you know how to do this, then do it and skip the rest of this section.

If you don't know how (or don't want) to upload your file to your website, I've got the next-best thing. We're going to upload it to Google Photos. (This used to be called Picasa Web Albums. Google is in the process of changing the name, so you'll still see it called both.) If you have a Google account or a Blogger blog then you're good. If not, you could create one, or you could use any number of other photo hosting sites.

Visit Google Photos and login if you need to. Click to "Upload" your image, then find the file on your computer and upload it. When you upload an image you can choose what album it is placed in. I chose to create a new album called "Public Album", but you can call yours whatever you want (or put the image in an existing album). Then click OK.


Now that the image is online, we need to make it publicly available. If you tried to make your button right now it would work for you because you have access to see the image, but everyone else in the world will just see a missing picture. That's not good.

In Google Photos, you should be viewing the album you just created. If not, navigate to it now. Select Actions, then Album Properties. This will bring up a window with the details of your album. The only thing you need to change is the Visibility setting. Change it to "Public on the Web". This means that anyone can view the pictures in the album without needing to login. They will also show up when people search.


There's one last step, you need to find the URL of your image. In Google Photos, click on your picture to view it. In the right sidebar click on "Link to this Photo". This will open up a couple text boxes and some settings. Make sure that you Select the Size of "Original Size". Then check the option "Image Only (no link)". Now, the information you're looking for is in the "Embed Image" field. Copy the text from that field, and paste it into notepad or Word for safe keeping during these steps.)



The Link for our example image is: https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDpTseUZRqsSVUHh2VKE2-HTSYvU5aLvYmhQdmgtMmHT8cI3ypHGaF7qd0WcP1Qv4bckuozQTpHLgLZiZe_2uJyEQ8RK8trh3lixMSB8FBi_tDospNlVFddhySZAQutXY5SMwy97NOvTc/s800/upside%252520of%252520down.jpg

Wow! That's ugly and long, but it works and the people who view your site won't have to see that link. They'll just see your awesome image.

Decide Where You Want the Button to Go

When someone clicks your button, where do you want them to go? Open up an internet browser and go to the page. Then copy the full text out of the address bar. Again, paste this into the notepad or Word doc you used in the last step.

For our example, we have several options.


We're going to use the link to her book blog, but there is no wrong answer. Here is the URL: http://theupsideofdown2.blogspot.com/.

Use the Tool

You now have the information you need to use the tool. Just copy and paste the information from your notepad or Word document into the tool. Put the image URL (from Google Photos) into the Image URL field. Put your destination URL (the blog address) into the Link URL field. Make sure these links include the full address that means it has to have the "http://" part.

Click Generate and see what it looks like. That's nice.


Extra Options

The tool has some other options you can try.

If you enter a Message and check Show Message then it will display the message under the image. You can use this for short blurbs like "Buy Today", or "Ends Sept 24th", or "Available in Oct".

If you check "Show Copy Text Box" then a text box will be created under the image with the code people need to copy and paste to get your button on their site. This is useful when you post your button on your own site. Anyone who wants to grab your button can copy the code and use it.

Go ahead, play around with the options and see what works best for you.

There you go, a quick tool for creating image buttons for blogs and websites. If you use the tool let me know in the comments. And if you have any other technical questions, send them over.

9 comments:

Jordan McCollum said...

I love this tool! I do this by hand often enough, but I have to look up the code every time—no fun.

Canda said...

You are seriously brilliant--thank you! Your work is making us all work better.

John Waverly said...

Jordan, Is there anything you would like to see added to the tool? If so, I could update it and post it to my website for easier access.

Canda, Thanks for the encouragement.

Mary said...

John, this looked very helpful. I copied and pasted to my WP file, but didn't get the images or tables. thanks for the info.

John Waverly said...

Mary, I'm glad this helped you. I'm not sure what's up with your WP file though.

Maria Hoagland said...

I was loving this. It looked great in your preview area but then when I copied it into my blog, the pic wouldn't show up, just a tiny box. What am I doing wrong?

I noticed on your post RE the dynamic views (the one about the hurdles) that you mentioned that the buttons don't work anymore. Is that why? Even if I'm not using one of the new views?

Thanks! You're awesome!

John Waverly said...

Maria - I'm glad you got your problem figured out. Thanks for the shout out on your blog.

And for everyone else, Maria found another blog post that walks through the process of making your own button. You can read it here: http://bit.ly/oG6rY1

Hogan's Hero's Swim School said...

When I try this, It gives me a broken image error. What am I doing wrong?

John Waverly said...

Cindy - Hmmm, that's frustrating. Make sure you use the full URL path including the "http://" part. If you are still having troubles, fill out the form, then copy the "Code" and paste it into an email and I'll take a look at it.

Creative Commons LicenseUnless otherwise noted, all posts on the John Waverly blog by John Waverly are licensed under a Creative Commons Attribution 3.0 Unported License.
* Background image based on Night Sky theme by Ray Creations