Facelift Image Replacement (FLIR) for WordPress
Facelift Image Replacement (FLIR) is a WordPress plugin that generates image representations of text on your web page in fonts that visitors would not be able to see.
Download from 23Systems
Facelift Image Replacement 0.8.0 (311) - 494.01 KB
Download from WordPress.Org
Facelift Image Replacement for WordPress
Description
FLIR for WordPress implements Facelift Image Replacement (FLIR) by Cory Mawhorter. It is in rapid development and almost completely configurable from the admin panel. Several freeware fonts are provided with FLIR for WordPress.
FLIR for WordPress is SEO friendly and only renders the image in the browser if JavaScript is enabled. You HTML/XHTML code remains unchanged leaving your head tags readable by search engines and the page readable by those without JavaScript.
Facelift Image Replacement (or FLIR, pronounced fleer) is an image replacement script that dynamically generates image representations of text on your web page in fonts that otherwise might not be visible to your visitors. The generated image will be automatically inserted into your web page via Javascript and visible to all modern browsers. Any element with text can be replaced: from headers (<h1>, <h2>, etc.) to <span> elements and everything in between!
You can see examples of what it does here: http://facelift.mawhorter.net/examples/
IMPORTANT: If using a version prior to 0.7.0 please delete your existing version before installing this version
Before running autoupdate please empty your facelift/cache folder.
Installation
Requirements
PHP and GD. Little testing has been done with different versions of PHP. If you have PHP 5 with GD enabled you shouldn’t have any problems. PHP 4 currently has some issues but should be resolved in the next release of Facelift. A newer version of ImageMagick (6.3.7+) is required for the FancyFonts and QuickEffects plugins.
If GD is not installed on your server you will have to recompile PHP to include GD. If you are comfortable in WHM for cPanel, you can do that under the “Update Apache” tab (check the “GD” box). Check your settings carefully (especially the PHP version - cPanel may try to change it) before you hit build. Plesk and ISPConfig should have GD enabled by default. If you are not comfortable doing it yourself, ask your hosting company to do it for you. (Thanks Steve!)
Delete your existing version before installing this version
- Extract to your
wp-content/pluginsdirectory. - Look in
wp-content/plugins/facelift-image-replacement/facelift - Set the
wp-content/plugins/facelift-image-replacement/facelift/config-flir.phpto be writable (chmod a+w config-flir.php). - Set the
wp-content/plugins/facelift-image-replacement/facelift/cacheto be writable (chmod a+w /cache) - Add fonts of your choice to
wp-content/plugins/facelift-image-replacement/facelift/fontsfolder - Activate plugin in WordPress admin panel
- Set FLIR configuration in the admin panel -
config-flir.phpmust be writable for changes to take effect. - Customize tags for FLIR on FLIR submenu under the Design menu
Notes
- QuickEffect Plugin is not implemented yet
- If using a version older than 0.7 completely delete any old verions before upgrading as this plugin is under rapid development
- You cannot auto-upgrade from versions older 0.7.0
- Text remains intact in source so search engines see your page as text!
Screenshots
Frequently Asked Questions
It doesn’t work
There are number of reason the plugin might not work. Check the following:
- Please ensure that you have a cache directory at
wp-content/plugins/facelift-image-replacement/facelift/cacheand that it is writable. (chmod a+w /cache) - Please ensure that your
config-flir.phpfile exists atwp-content/plugins/facelift-image-replacement/facelift/config-flir.phpand that it is writable. (chmod a+w config-flir.php) - Make sure the
wp-content/plugins/facelift-image-replacement/facelift/is readable - Check your theme’s
footer.phpfile and make sure it has thewp_footer();function in it. It should be located just above the</body>element close tag. - Check your theme’s
header.phpfile and make sure it has thewp_head();function in it. It should be located just above the</head>element close tag. - Check the FLIR admin panel under the design menu and make certain all the options are set in the FLIR Configuration section. Read the help text on the right of each option for information.
- Check the FLIR admin panel under the design menu and make certain all the options you want are set in the Elements to Replace section. Heading 1 is generally used for the blog heading, Heading 2 is used for the posts on the main page and on individual post pages, Heading 3 is often used with posts on the catagories and tags pages. Small is often used for the date and author of the post.
Will FLIR be configurable from the admin panel?
FLIR is almost completly configurable from the admin panel. Eventually it is planned to be able to configure FLIR almost completely from the admin panel. At present to configure how and what fonts are used with flir and certain element to be replaced by FLIR.
Will the FLIR plugins be usable?
At present the FancyFonts plugin is implemented. QuickEffects will be implemented next. They require ImageMagick 6.3.7 or higher to function correctly and will be configurable from the admin panel.
What about the fonts that come with FLIR?
All the fonts that come with FLIR are either free or Open Source.
What advantages would you say FLIR provides over sIFR? Besides, of course, from needing flash?
- Facelift creates transparent PNGs which can lie over the top of any background you want. For example, take a look at Example #5.
- It can easily create multi colored/font headers. (Example #3)
- It can replace links and maintain their clickability (though I believe this functionality was added to sIFR).
- It is very easy to implement. No other tools besides a web browser are needed and it is very easy to maintain.
- It plays well with third party libraries such as jQuery and prototype.
- You can take advantage of plugins such as the QuickEffects plugin and add things like drop shadows and pattern/gradient fills if you have ImageMagick installed on your server.
Is there some kind of caching system? If so, how does it work?
Facelift caches all images it generates to disk. It then will send appropriate headers to the browser if the image has not changed. This allows for drastic speed increases in rendering when browsing a website. After a couple of page views you sometimes won’t even notice the text get replaced. By default, the cached images are saved indefinitely, but you can change facelift to run through the cache every so often and remove old images to save disk space. Just change the settings in the admin panel.
It still doesn’t work / I have other questions
The best places to get answers are here on this page or FLIR Integration with WordPress Forum.
Known Issues
- Automatically updating the plugin does not always work - I have not tracked down the issue but I suspect it has to do with the cache folder. Before running autoupdate please empty your
facelift/cachefolder.
Change Log
0.8.0
- Updated Facelift to 1.2 release
- Font Collections
- Basic Callback Functions
- Better error handling
- Bug in generateURL causing HTML not to be sanitized
- Added functionality/bug fixes for “wrap” mode. Better line-height support.
- Rewrote element replacement algorithm. You no longer need to encapsulate plain text in span elements to have it replaced. The new algo is recursive so it can replace any number of child elements. You could even run it on document.body if you wanted to!
- Added flir-image and flir-span classnames to the elements flir creates
- Javascript Plugin support!
- Moved DetectImageState code from facelift.js into a Javascript plugin
- querySelectorAll support for the browsers that support it (Safari, FF3.1 alpha)
- Font size modifier for cSize in FLIRStyle. You can now specify a font size calculation to be applied against the CSS font size. For example, if you want the generated image to have a font size that is 140% the one you specified in your CSS you could do cSize:’*1.4′. All font sizes will then be multipled by 1.4.
- FLIRStyle.buildURL no longer requires an HTML object to be passed
- Hover caching problems fixed. Better hover style support.
- JPG and GIF support! Set the “output” option in FLIRStyle. The default output option is auto. Auto will cause the generated image to be a transparent png if the element doesn’t have a background color set. Otherwise it will use GIF.
- Hover now only works with <A> elements.
- Rewrote code for better readability and adherence to code conventions (hopefully)
- Redesigned admin interface to be more logically organized (again, hopefully)
- Added more helpful information to the configuration text.
- Added ability to specify all elements to replace rather than just the few I had.
- For example you can specify something like h1,h2,div#sidebar a to have your h1, h2 headers and all of the sidebar links replaced.
- Fixed deactivation routine to preserve config-flir.php during auto upgrade.
- If manually upgrading please deactivate plugin before upgrading to ensure config-flir.php is configured correctly.
0.7.7
- Updated Facelift to 1.2b3-3
0.7.6
- Updated Facelift to 1.2b3-2
0.7.5
- Added Facelift FancyFonts plugin option. FancyFonts uses ImageMagick to render fonts instaed of GD and can be useful
- Fixed the errant semi-colon issue that everybody keeps telling me about but I kept not seeing for some reason
- Added (hopefully) better text prompts to the admin panel
0.7.0
- Initialize plugin and set basic settings on install - note: the new version will overwrite your current config-flir.php
- Set all config-flir.php settings (except allowed domain and font discovery which is done by the plugin)
- Ability to flush cache on demand
- Ability to reset the entire plugin and reinitialize
- Ability to choose to have fonts automatically replaced for h1 to h5 headers or select a specific JavaScript library to use (jQuery, Prototype, Scriptaculous)
- Latest version of Facelift 1.2b2 which fixes numerous rendering issues.
- Admin panel page reloads after saving changes to reflect updates
- Reduced number of fonts that come with plugin - all fonts are freeware/open source and redistributable
- Easy addition of your own fonts - just drop in fonts folder and configure from admin panel
- Selection of what fonts to include during element font selection
- Moved additional admin includes into subdirectory
- Minor cosmetic and coding fixes
0.5.9
- Fixed issue with not running correctly when WordPress is installed in a sub-directory (i.e. http://yousite.com/personal/blog/)
0.5.5
- Removed prototype implementation in favor of jQuery, noticeable improvement in speed.
- Bug with IE in rendering header in some cases not jQuery related
0.5.0
- Added per element modes
0.4.1
- Updated Facelift to 1.2b
0.4.0
- Basic admin functionality added
- Implemented prototype in plugin for per element rendering
0.3.0
- Initial Release
- Auto redering of
<h1>to<h5>only - Using Facelift 1.1
Upcoming Features
- Quick Effects (require ImageMagick) ~v0.9
- More…
Under consideration
- Uploading of fonts from within the plugin
Development Version
- Always the latest code
- May be buggy - actually probably is
- Please remove existing version before install development version


I thought I wrote a response already, but it’s not showing up. So if you get this twice, sorry!
You’ve been immensely helpful, and this is an excellent plugin, thank you very much! Everything seems to be working now, I’m using FLIR for my navmenu items, post titles, sidebar titles, postinfo at the bottom of each post, and page titles.
The only slight thing that I notice, and probably most visitors won’t, so I’m not terribly worried about it, is that some of the words are different heights. Look at my navmenu–see how BOOKS is just a teensy bit above the rest? Also check out the postmeta data–the lines with the tags and date are a bit wiggly. Is this something that imagemagik thing would fix? If so, and if it’s free and not too complicated to install, I might get it.
Anyway, thank you so much. Oh, and I changed the fonts to px for now. Em’s still scare me a little–how they’re all intertwined. In the past, I’ve changed one thing, and suddenly, accidentally a whole bunch of other stuff was effected. I know that’s the point, I’m just not sure I trust myself enough yet to implement it in a theme that doesn’t have it at all yet.
Hi, I found another clue to what was causing the font-size problem. I think it was because in my CSs, I had the font-family named starting with Futura, which maybe it didn’t recognize? So somehow that made it render my font really small? And no matter what px size I specified for the font, it wouldn’t change. Anyway, when I change it to Georgia or Lucida, the font-size works correctly again.
Still some funny things going on though, I think I need the image magick thing installed. My cursive font isn’t rendering quite right–some of the letters are broken apart where they shouldn’t be. Would this be fixed if I figured out how to install imagemagick? Also, some things are really bumpy, like, look at my metadata under the post title here: http://simplymother.com/tag/website/
Would all this be fixed with imagemagick? If so, where does it need to be installed? Do I need to do anything else after installing it? The Fancy Fonts plugin already included in FLIR, correct? TIA!
Thank you, you’ve been incredibly helpful. All appears to be working now. I am using it for my navigation menu, post titles, sidebar titles, and the postinfo under each post. The only slight thing is that I notice (and probably regular visitors won’t) a slight deviation in some of the words. Take a look at BOOKS in my navmenu–it is a teensy bit higher than the rest. The other place it is noticeable is in the metadata–the tags and date kinda wiggle up and down. Is this something that would be fixed if I had that imagemagik thing? If so, and if it’s not too complicated to install, where can I get it?
At any rate, this is a wonderful plugin, thank you so much!
Hi Dan
Thanks for your work on this plugin. I wonder if you have a moment to suggest some help with issues - explained here http://forums.mawhorter.net/viewtopic.php?id=157
I’m still getting all the weird issues mentioned there. Issues in both IE and FF. Sounds like Cory chalks it up to wordpress but you + others seem to have success with it so maybe you have some suggestions?
I’m considering giving up FLIR altogether but really want it on this particular site
Thanks!
I’ll see what I can find. I took a quick look at the site you mentioned and the only problem I’ve seen so far is with the menu not having enough space around the fonts - probably fixable by adding a margin. I’ll do some more solid testing in the next day or so. I’m sure we can get it resolved.
EDIT: Actually, I took a deeper look than I had planned - there is definitely something weird going on - I don’t know what yet. Possible some other JavaScript is interfering. I’m not seeing the generate requests for most of the text - are you using any sort of caching plugins?
Thanks Dan. There’s none activated right now. There’s wp-cache and wp super cache in a de-activated state (my webhost installs by default when I set up WP).
I don’t think any of the active plugins do caching or JS, not that I know them intimately. I have enabled:
FLIR for WordPress
GigPress (custom write panel + output for the on tour page)
Improved Include Page (include a page within another)
My Page Order (drag + drop page order in the admin)
WordPress Automatic Upgrade
[...] avoir plus d’informations à ce sujet, je vous invite à consulter le site de l’auteur du plugin (il y a entre autres une FAQ) et cette page avec des [...]
Hi, this will be a wonderful plugin for me, if someone can help me figure it out!
It’s working, but it’s not. I’ve gone through your troubleshooting list and everything appears to be in order. It’s working in that it renders the images on my site, however, it will only use the default font for everything, and it doesn’t appear take into account font-size at all. I mean, I don’t know where it’s coming up with the font-size–it’s not even using the default font size that I set in the configuration panel–I tried changing that and it made no difference.
Is this a problem with my theme? Something in the CSS file? Everything is fine without the plugin, but perhaps it is something about this theme that doesn’t jive with the plugin? If anyone has any idea where I might begin to look, I would really appreciate any hints you can give me.
One other thing, is there a way to use this for classes instead of just headings? I don’t know if they are elements or not. For example, my date is wrapped in a p class=date tag, and in the css file it is just stated as .date. I tried multiple ways of entering this as an element in the plugin (.date, p class=date, date), but none worked. Is there a way? If not, I think I can just change it all to h4 or something, right? But anyway, I tried that and it did render the image, however, it was the default image rather than the one I specified, as stated in my main problem above.
Help?
Make sure it’s not set to automatic for the JavaScript method - select jQuery or one of the others. I believe there are some font size issue with different browsers. If you have ImageMagick installed you can try using the fancy fonts options. Once it’s not set to automatic you need to configure what to replace in the Elements to Replace section.
Your theme shouldn’t be an issue. There could possible be an issue with the CSS file but that’s unlikely. I’ll take a look at see if I can figure out why the font sizes are off.
Yes you can use it for classes instead of just headings - just add
p.dateto the Element Types in the configuration section and save then that option should appear in the Elements to Replace section.GREAT! Thank you, it was set to automatic. Jquery works! I have no idea what any of that means, or even if I had javascript and php enabled. I’m pretty sure I don’t have imagemagik, since I’ve never heard of it.
Still trying to figure out the sizes. I want to revamp all the sizes anyway because I don’t like that they’re in points but first I have to figure out how the em things work. If you have any other ideas on the sizes, let me know. I’ll keep working.
WordPress comes with jQuery, Prototype and Sciptaculous JavaScript libraries included and runs using PHP on the server. FLIR requires both PHP and JavaScript to work so if you see it render you have JavaScript enabled in your browser - as all modern browsers do.
1em is equal to the current font size. 2em means 2 times the size of the current font. E.g., if an element is displayed with a font of 12 pt, then ‘2em’ is 24 pt. The ‘em’ is a very useful unit in CSS, since it can adapt automatically to the font that the reader uses. So you can leave the font to default to the browser’s default font size - 1em and set all other fonts around that. I often set the body font to somewhere between 75% and 85% (depending on the font I am using) then adjust the rest of the fonts based on em. FLIR however probably works best using px to determine font sizes where you can specify the exact size in pixels. FLIR does not work so well with using pt to determine font size.
Your site is looking good. Let me know when you are done so I can see how FLIR looks with the finished product.