How to add images to comments

Our site software here at bikecalgary.org doesn't provide for a way to upload images for use in comments. But here's how you can do it. Print this page so you can refer to it while you work.

  1. Create a new personal blog posting (call it, say, "My Pictures for Use in Comments"), and in its Options, uncheck the "Published" option: this will keep the posting invisible.
  2. Upload the image you want to use (the smaller the better) and then copy its URL (internet address), eg. http://bikecalgary.org/files/newimage.jpg
  3. In the body of your blog post, add the required minimum length of text, say "this blog post is used for storing photos that I want to insert in comments to others' posts."
  4. Add code in your blog post to display your image for testing purposes. See below on how to do that.
  5. Preview your blog post, ensuring that below your text entry, in Input Format, you've selected Full HTML, otherwise the image will never be visible.
  6. Once you've got a visible image, you can submit your post, which will remain hidden. Now you can go and comment on the story of interest.
  7. At the point in your comment where you want the image to appear (usually at the beginning or end of your comment), insert a line that uses the HTML IMG tag, like so:
    <img src="http://bikecalgary.org/files/newimage.jpg">
  8. If your image is wider than 640 pixels, please reduce its size to that width or narrower by adding a width= parameter to your img tag, like so:
    <img src="http://bikecalgary.org/files/newimage.jpg" width="480">
  9. Preview your comment to ensure that the image is visible, remembering to select Full HTML as the Input Format for the comment.
  10. When you're satisfied, Submit your comment.
  11. If you want to add more pictures later, you'll need to find your blog posting (which is hidden). In the left sidebar menu, click on User Account, then on the Track tab. You'll see a listing of all of your postings and comments in reverse chronological order. You should be able to find and re-open your blog posting to add the new image to it.

This is a bit klunky, but it's good to know that at least there is a way to do it!

Forums: