# Greasemonkey script to add your own SDMB avatars

**URL:** <https://boards.straightdope.com/t/greasemonkey-script-to-add-your-own-sdmb-avatars/598062>\
**Category:** About This Message Board\
**Created:** [September 29, 2011, 8:54pm UTC](https://boards.straightdope.com/t/greasemonkey-script-to-add-your-own-sdmb-avatars/598062 "2011-09-29T20:54:41Z")\
**Posts on this page:** 1\
**Showing post:** 66

<div class="post-metadata">

**Author:** ![spinky](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@spinky](https://boards.straightdope.com/u/spinky)\
**Post date:** [October 1, 2011, 9:44am UTC](https://boards.straightdope.com/t/greasemonkey-script-to-add-your-own-sdmb-avatars/598062/66 "2011-10-01T09:44:14Z")

</div>

Here’s a fun little thing I whipped up: A CGI which takes a numerical userid as a parameter and redirects to that SDMB user’s avatar URL, as found in the user’s profile (it first checks for an “SDMB Avatar: \<url\>” entry like [here](http://boards.straightdope.com/sdmb/member.php), and if not, it returns the standard SDMB profile pic URL, which ends up being a 1x1 pixel white image if the user has no profile pic or if you’re not logged in.

You can use it blindly for an \<img\> tag like this:

```auto

<img src="http://splitter.august20th.com/sdmbav.rb?userid=79856">

```

(for the nerds: it grabs and parses profile pages on-demand, caching the found urls in a database. It won’t re-snarf a profile page if it’s gotten it within the past hour.)

---

_[View the full topic](https://boards.straightdope.com/t/greasemonkey-script-to-add-your-own-sdmb-avatars/598062)._
