In my previous article, I showed you how to prepare your blog images in order to create a photo gallery in Blogger.
This article will show you how to create the gallery, add and edit the code, and insert your image links and blog post links.
The next article will show you how to resize your thumbnails using code.
To create your gallery, you will first need to create a page in Blogger. See the attached list for step-by-step instructions for creating a new page.
After you have created the new page and you are in html view, copy and paste the following code:
<table cellpadding="3">
<tbody>
<tr>
<td align="center" width="25%"><a href="your project url here/" target="_blank"> <img height="140" src="your image url here" width="140" /><br />your descriptive text here</a></td>
<td align="center" width="25%"><a href="your project url here/" target="_blank"> <img height="140" src="your image url here" width="140" /><br />your descriptive text here</a></td>
<td align="center" width="25%"><a href="your project url here/" target="_blank"> <img height="140" src="your image url here" width="140" /><br />your descriptive text here</a></td>
<td align="center" width="25%"><a href="your project url here/" target="_blank"> <img height="140" src="your image url here" width="140" /><br />your descriptive text here</a></td>
</tr>
</tbody>
</table>
You can adapt this code to your particular gallery layout. For example, this code as is will allow you to create a row of four square thumbnail images. If you prefer more or less, add or subtract the code between <td align and </td> and adjust the width percentages. For example, a row of three thumbnail images might look as follows:
<tr>
<td align="center" width="33%"><a href="your project url here/" target="_blank"> <img height="140" src="your image url here" width="140" /><br />your descriptive text here</a></td>
<td align="center" width="33%"><a href="your project url here/" target="_blank"> <img height="140" src="your image url here" width="140" /><br />your descriptive text here</a></td>
<td align="center" width="33%"><a href="your project url here/" target="_blank"> <img height="140" src="your image url here" width="140" /><br />your descriptive text here</a></td>
</tr>
To add more rows of images, copy the code between <tr> and </tr> and paste it above </tbody>. To allow breaks in your gallery for a descriptive header, create a table above and below your header. Everything between <table cellpadding="3"> and </table> encompasses a table.
Each image and link will require you to enter your information. In the code below, note that "your project url here/" is where the web address of your blog post should go, inside the quote marks. The image height and width are up to you. Currently they are set at 140 pixels. "Your image url here" will be covered later. Your descriptive text here is the text that will appear onscreen under your thumbnail image.
<td align="center" width="33%"><a href="your project url here/" target="_blank"> <img height="140" src="your image url here" width="140" /><br />your descriptive text here</a></td>
Now to the quirky part. How do you get your image URL from your nicely cropped images in Google Photos (Picasa)? I found the simplest way is to temporarily insert the image into the top your page and copy the URL from there. See Step 4 in the attached list for more details. Then delete the image. You only need the link.
In Blogger, you can click Preview to see how your gallery page will look.













Comments