About "SIIR"

that is, scalable inline image replacement

NOTE: This page is a mirror. The original page has been taken down by the author. The images here were rendered using the original scripts. See the xhtml+xml compliance test suite for some modifications and improvements to the scripts.

Welcome! It would appear that through either word of mouth or by perusing through my code you have stumbled upon this little mini-website-tutorial-dingy. Sorry, there's no grand prize for discovering the secret toy at the bottom of the box, but if you pay close attention, I'll give you some valuable information and a free program at that! Scalable Inline Image Replacement, more commonly known (to me, at least) as SIIR, is the dynamic image replacement method that I, Ryan Petrello, have personally developed and continually use on all of my client websites through AxisFive Media Solutions.

The SIIR program serves to basically change dynamic text on your website into pretty generated images with any font of your liking. The real magic of SIIR comes when you examine the XHTML source of this page. Those beautiful headings you see generated above are not pre-made images. They're merely <h1> and <h2> tags with text inside!

How It Works

in psuedo-code-english, i promise

In the likely case that you're a weird nerd like me and are interested in the inner workings of this program, here's the most basic description I can conjure up. In its most basic form, here's a generalized description of how SIIR works:

Other Tidbits

miscellaneous features, tidbits, etc...

System Requirements

what you need for it to work

For SIIR to work correctly, you need a web server that has PHP4.2 or greater correctly compiled with the GD Library version 1.6 or greater. In the setup, make sure that you enable support for PNG and Freetype fonts, as these are the backbones of the SIIR program.

While SIIR works nicely with this setup, problems have arisen with users running PHP5. This is currently being investigated; if you're having PHP5 issues, expect a fix for this soon.

For information on installing the GD library with your PHP installation, please refer to PHP: Image Functions

For info on your server's PHP version, run the following PHP code:


For info on your server's GD setup, run the following PHP code:


Download/Setup SIIR

take advantage of my sweat and blood!

Feel free to download the program and use it yourself. I would request that if you do use the program that you stick my name, or maybe a link to axisfive.net somewhere in there or on your site, but if you're selfish and insecure I suppose you don't have to.

Download the Files

Once the files have been downloaded, there are a few simple steps to implementing them on your website:

Common Errors/Problems

stuff to keep in mind

The following is a list of errors and small reminders along the way for those who plan on using this script.


or comments, even

I'm too lazy at this point to make a spiffed-out contact form, so if you've got a specific question about SIIR that is not addressed below, send a message to siir@axisfive.net. That's it. Enjoy.

comments (27)


other people who helped

While the majority of this script was developed by myself, the following is a list of people who have made notable contributions, specifically in the category of pointing out my blatant errors.

SIIR Test: Compliance with application/xhtml+xml