Polaroid on the Fly Wordpress Plugin
Plugins, WordpressI am releasing version 0.7 of the Polaroid on the Fly plugin.
Creates polaroids of images on the fly for thumbnails in posts. Support for lightbox included. Built on modified Polaroid-o-nizer v0.7.2 sources.
I wanted to mimic the Polaroid look that you can achieve with Google Picasa to add thumbnails to my posts. I found a plugin titled WP-Polaroidonizer that did what I wanted to some extent but it didn’t have the right feel to it.
The other problem I have with Polaroid-o-nizer and WP-Polaroidonizer is the lack of security. When I mention lack of security there is by default no way to restrict external sites and users from generating Polaroid pictures using your installation of Polaroid-o-nizer.
The goal of this plugin was to use rel= style html img tags to transform a simple URL into a Lightbox URL in which there is a thumbnail image in your post which is linked to an image that can be loaded using Lightbox or any of the Lightbox clones/alternatives.
Demo
Screenshots
Requirements
- Wordpress 2.0
- PHP GD Module
- Lightbox - Not really a requirement but a recommendation if you want to have a nice ajax/javascript image overlay on your page
Installation
- Upload the `polaroid-on-the-fly` folder to the `/wp-content/plugins/` directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
Upgrade
- Deactivate the plugin through the ‘Plugins’ menu in WordPress
- Delete the previous `polaroid-on-the-fly` folder from the `/wp-content/plugins/` directory
- Upload the new `polaroid-on-the-fly` folder to the `/wp-content/plugins/` directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
Usage
- Create an image link in your post in the following format:
<img src=”http://domain.tld/directory/to/image.jpg” rel=”polaroid” alt=”Picture[album]” />
- Be sure to include rel=”polaroid” as this activates the plugin.
- If alt=”Picture[album]” is included the portion listed here as Picture will be displayed as the image title in Lightbox and the portion listed as [album] will group multiple pictures into an album called album. The alt tag is not required and if used the [album] portion is not required. Read the Lightbox usage for more details on Titles and albums.
- Be sure to place each html img tag on a separate line.
- This plugin supports the following image formats: jpg, png, gif
NOTE: Do not use the visual editor for doing the above use the code editor.
FAQ
Q: What Do The Error Messages Mean:
A:
Source image resolution below min (200×200px)
The image referenced in the image tag has a resolution less than 200×200 pixels.Source image resolution above max (2000×2000px)
The image referenced in the image tag has a resolution greater than 2000×2000 pixels.Source URL Incorrect of does not Exist
The URL of the image referenced in the image tag does not exist.Background color is invalid use RGB only
The background color specified on the options page is not a valid 24 bit RGB color. When written, RGB values in 24 bits per pixel (bpp), also known as Truecolor, are commonly specified using three integers between 0 and 255, each representing red, green and blue intensities, in that order. For example:white is 255,255,255
black is 0,0,0
red is 255,0,0
green is 0,255,0
blue is 0,0,255Source image unknown file type (jpg,gif,png only)
You should never see this message. The regex used to find the img tag with rel=”polaroid” will only select img tags including jpg,gif and png. I figured hey why not create a useless image it may come in handy some day.PHP GD Module Not Found. Polaroid on the Fly will not work. See http://us.php.net/gd for installation information.
You need to have the PHP GD Module Installed. This plugin requires the GD module to make the polaroid image. This plugin will not function without this module.PHP GD Module Found. However, it does not include support for GIF. You will not be able to use a GIF for the source image. See http://us.php.net/gd for more information.
You have the PHP GD Module installed but the GD version does not support GIF images. This plugin will still work but you will not be able to use a GIF for the source image.
0.7 (2008-07-31):
- Updated for compatibility with WordPress 2.6 (wp-content and wp-config.php changes).
- Changes to gen-polaroid.php to accommodate Ubuntu PHP GD Packages.
- Updated path to the font ttf file in gen-polaroid.php.
- Output image now in png format instead of jpg.
0.6 (2008-01-23):
- Added ability to opt in to using Lightbox.
- Added option to select how the image will open. (ie. new window, self)
- Added option to specify the hright and width of the thumbnail
- Added option to reset all options to their defaults
- Updated descriptions on the Options page.
0.5 (2007-10-24):
- Added error reporting. Errors will be displayed as a replacement to the image in the post.
- Added images for use when displaying the above errors.
- Added error reporting for GD Module. Errors will be displayed on the options page.
- Added functionality to opt in to using encoded URLs.
- Fixed case sensitvity in regex used to match the img tag (now case insensitive).
- Removed large amounts of uneeded code in the Polaroid-o-nizer script.
- Converted all files to UNIX format.
0.4 (2007-10-03):
- Added options page (Options->Polaroid on the Fly)
- Added functionality to opt in to security restrictions
- Added functionality to not require the use of tinyurl.com and fopen
- Added functionality to display the photo caption using the alt text
- Added support to change the background color from the options page
- Removed requirement for .htaccess
- Renamed the Polaroid-o-nizer files
- Changed references to Polaroid-o-nizer files
0.3 (2007-09-18):
- Initial Public Release
To Do
- Add features for x and y offset
- Add features for rotation angle
- Add additional error reporting for the offset and angle
- Add functionality to options page to generate a URL for placement elsewhere on the site.
- Add functionality to cache the polaroid images.
Download
Polaroid on the Fly version 0.7
Archived Versions
Comments
Pingbacks
- übermick.com » Übermick.com gets a coat of paint! Pingback on Wednesday 30th January
- Sivel.net Staging − Polaroid on the Fly v0.6 Released Pingback on Thursday 7th February
- possible pluggins : ninepatch9.org Pingback on Sunday 10th February
- 30 Free Resources for Photoblogging and Image Galleries (Wordpress) | Speckyboy - Wordpress and Design Pingback on Thursday 20th March
- Creation » Blog Archive » 30 Free Resources for Photoblogging and Image Galleries (Wordpress) Pingback on Saturday 22nd March
- Wordpress Galleries » Blog Archive » Polaroid on the Fly Pingback on Saturday 26th July

Hello, your plugin looks great, it’s what i was looking for the blog + archive i’m making for my work
Anyway flattering is not the motif of this comment, just I didn’t find an email address and wanted to let you know, your Slideshow 2 is not displaying the ‘NEXT’button/image, although when clicking on the right-side 50% it works… This I see from my Mac OS 10.39, Firefox 2. Check if it is just mine or there’s some problem your files
Thank you for making nice plugins for free.
When I have activatet “Polaroid on the Fly Wordpress Plugin”, I get this error message when I try to publish any post.
“Warning: Cannot modify header information - headers already sent by (output started at /usr/home/web/217349/blog/wp-content/plugins/polaroid-on-the-fly/polaroid-on-the-fly.php:387) in /usr/home/web/wno217349/blog/wp-includes/pluggable.php on line 331″
I get the same error message when I try to deactivate the plugin.
Arly
Arly: What version of Wordpress are you using?
Hi Matt,
Plug-in looks great, I’m puzzling over the requirement for Imageshack - I have to host my images there? I’m testing it and when I save the entry it returns to a blank screen. On viewing it, the lightbox portion works but the polaroid thumbnail does not show. Its currently referring to an image that’s elsewhere.
Thanks in advance,
Hei Matt
I have now started from the begining with new database, Wordpress 2.3, default theme, but I still have the same problem!
Do you have any idea…
I am working on a Mac with Safari web-browser.
Arly
c.k. : You do not have to host your images at imageshack. Polaroid-o-nizer users imageshack as a cache for the image creation instead of using a local cache. Your image can be located anywhere you like it. I would suggest using the full url to the image. If you are still having issues please feel free to contact me via the contact link in the navigation menu above. It would make diagnosing the problem easier if you send me both the
<img ....>tag you are using as well a link to a post that has this plugin in use.@Arly: Try to convert the file from DOS formato to UNIX (dos2unix utility). I was having this error and identified that it’s because the end-line controls were breaking stuff. Works like a charm after this :)
Hi,
I’m would like to use the polaroid on the fly plugin. It looks really cool.
But it doen’t work with my wp 3.2 installation.
If I add link to the image in the post
eg.
the image doesn’t appear in the browser :-(
Am I doing something wrong?
Regards
Rafael
@Rafael: Can you post the html you are using for the img tag? Also please make sure that you are using the code editor and not the visual editor. In addition can you give me a link to the page that you are trying to use this plugin on?
Hi Matt, I am having the same issue as Rafael… can you thin of how I might resolve this?
By the way, as you can see, I like your style…Thanks in advance, Chad
IMAGE TAG
PAGE POST
http://leadbased.com/wordpress/?p=4
That is ok…I was able to determine the code used for the image tag by the output when browsing the source of that page.
Looks like the cause is that you are using bild-1.thumbnail.png which is below the minimum resolution (200×200) for Polaroid-o-nizer. Try using bild-1.png instead.
I’ll look into creating some sort of error message when the photo is out of the Polaroid-o-nizer ranges and update the plugin.
So in short the answer is that this plugin will not work with images smaller than 200×200 px and greater than 2000×2000 px.
And I also noticed that you didn’t have quotes around polaroid (ie rel=polaroid should be rel=”polaroid”)
In addition if you want the nice javascript popup/overlay you will need to install Lightbox
Hi, I’ve just installed the plugin, but can’t make it work.
The url i use is:
Pic is 1024×768.
Can you tell me what I’m doing wrong?
Samy
With that little information I couldn’t even begin to tell you why. But I would suggest making sure that you have the PHP GD module installed.
I’ve a problem with this plugin and with the original polarodonizer script
I’ve installed and seems it works good, but I can’t see the border of polaroid! I see a black bordr only.
Here what I can see… http://farm3.static.flickr.com/2267/1708688899_d676303552_o.jpg
PS: server has good setting
is a nice plugin, thanks
Well, first I am going to assume that the screenshot you have linked above is of your site and you are just using my demo picture. So there are a few possibilities. The first is that in the options page you changed the background color to 0,0,0 which is black which would account for the black border around the polaroid. The drop shadow around the image will not be visible when the background color is black.
Another possibility is that the browser you are using is displaying the image incorrectly.
Is it possible for you to post the link to the post where the plugin is in use rather than just getting a screenshot?
I tested the demo above with IE and Firefox and it does appear to be working fine for me. As for the code for the slideshow/Next button that is Lightbox which I am not affiliated with. Feel free to contact me via the contact link in the navigation menu above if there is anything additional that I can assist you with.
Well,
In option page the background colour value is 255,255,255 and i’ve not changed.
And yes… the image is yours. :)
this is the link http://www.city2.net/blog
PS: I’ve installed the original script http://polaroidonizer.b3ta.org/ here http://www.city2.net/polaroidonizer_v0.7.2 and if you test it you can see the same results! :(
I don’t understand… my server values are ok (PHP, GD libraries ecc…)!
Looks like after further inspection that it is a server issue as we discussed via email. Let me know if there is anything else I can help with.
Hi there, wanted to say thanks for the plugin, i have just installed it and think its great. i have a simple question I believe How do i have the polaroid thumb open in a new window??
hiya,
first i wanne say, thats what i need … but i might have some ideas for the next release. right at the moment im not familiar with your code, but specialy for i load sites it would be nice to be able to cache those images. maybe you do it already or make use of the own cache that wordpress is using if activated, but it might be a cool feature.
Is there a way to make the thumbnail bigger?
Thanks,
Mark
Great idea for the next release.
In the mean time if you wish to modify the code yourself you can edit polaroid-on-the-fly.php. Find “height=150 width=123″ and modify the values. There are 2 locations where this needs to be modified.
Great idea for the next release.
To do this in the mean time you would want to modify polaroid-on-the-fly.php. Find the $replace variable and add the code to open in a new window. (html code target=”_blank”)
Thanks! Works fine this way.
Matt,
I am trying to add a caption to the polaroid.
Do you what I need to add to get a caption in there? Something like: title=”my caption”>image #1
Maybe you can give an example?
Thanks,
Mark.
In wp-admin, Go to Options>Polaroid on the Fly
Set “Use Image Captions” to “Yes”. Click “Update Options”.
Now the text in the alt tag will appear as the caption. Keep in mind however that it will only show 8 characters in the polaroid.
Using the example from above:
<img src=”http://domain.tld/directory/to/image.jpg” rel=”polaroid” alt=”Picture” />The text “Picture” will show up as the caption.
Thanks again!
fantastic, i will give this a try and let you know… also, with the intergration with lightbox on my site, it doesnt give me the next, previous options so a viewer has to click out of the picture, then click on the next thumb they want to view, any ideas?
Hi,
I’ve just installed your plugin but I can’t make it work (I can’t see the image thumbnail)
PHP GD Module and Lightbox are installed and working.
Please have a look at http://www.wesnai.com/?page_id=9
Thanks a lot,
carlos
Another thing this plugin requires is the ability to make an http request from the server wordpress is running on to the server the image is hosted on. Perhaps your hosting provider does not allow you to make HTTP requests. There are a number of possibilities, you could always do some testing to see what the problem is. If you have SSH access to the server you could issue “wget http://url.to.image/image.jpg” and see if it can download it. Another way to check would be to try executing:
from the server to see if it downloads anything.
Hi,
Thanks for your fast answer.
I’m afraid I do not have ssh acces to the server where my web is hosted on so. Anyway, my web and the images I’m trying to use with your polaroid plugin are hosted on the same server. I’d really like to use your plugin. Any other idea on how to solve my problem?.
Thanks a lot,
regards,
Carlos
Hi Matt,
How would I change the default link of the polaroid from that of the source picture to a specific URL? What code would I need to change? - Thx, Joe.
@Joe: I assume you want to use a different frame for the final image. In that case you can either replace frame.png in the polaroid-on-the-fly directory with the one you wish to use or edit gen-polaroid.php and change the reference to frame.png on line 145.
First the code is like this :
<img src="http://domain.tld/directory/to/image.jpg" rel="polaroid" alt="Picture[album]" />When I want to manage my post it changes in this direction and doesn’t work anymore:
<img rel="polaroid" src="http://domain.tld/directory/to/image.jpg" alt="Picture[album]" />@eightysix: Make sure you never use the Visual editor when managing a post containing the code for this plugin.
Under the Usage section I list “NOTE: Do not use the visual editor for doing the above use the code editor.”
I just recently upgrade from version 5 to version 6 and now the Plugin is not working. I’m not seeing any pictures on my blog. Any idea what’s going on?
Okay, seems like that was just a flinch. Everything is fine.
Okay, sorry to keep posting here. But now it seems that if a user is using IE, the Polaroid is not working, but in FireFox it does. Any idea?
@Jill-Renay: Are you sure that the problem with internet explorer isn’t just that you need to clear the cache. Try using Ctrl-F5 in IE to force a full refresh of the page.
This plugin shouldn’t care whether or not the browser is Firefox or IE as all of the work is done server side to create the image.
If you are still experiencing issues contact me via the contact link in the navigation menu above and give me the URL to the post containing the image.
I’m having a couple issues. First off, I have text between my polaroids but it’s not showing up. Any reason why?
Also is there a way to make the polaroids not links to the original image?
Matt, kickarse little plugin you’ve made there, brother. Thank you very much, keep up the great work!
So I’ve gotten it mostly fixed but I still need to know how to get rid of the links on the photos and also i’m adding the alts for titles under each photo and for some reason they start quoting rel= as part of the photo title. heres the site with the problem: http://yruustar.org/contact
@Lorelai: You need to make sure that all of your img tag attributes are formatted properly. All attributes should have quotes surrounding the value after the equals (=) sign. For example:
<img src="http://domain.tld/directory/to/image.jpg" rel="polaroid" alt="Picture" />In addition please remember to use the code editor and not the visual editor when making these changes. And do not use the visual editor in the future when making changes to this page/post.
I am trying to use the Polaroid on the Fly plugin on my ‘about’ page (to begin with) and it works fine to display, but clicking on the pictures is a drag - it just opens the image in the browser window and my site is gone, which is not great.
I want the Lightbox style pop up window (I have lightbox installed and using wordpress) so how do I do this?
and how do I use the new features -
# Added option to select how the image will open. (ie. new window, self)
# Added option to specify the hright and width of the thumbnail
I want my thumbnails to be double the size.
thanks,
cb
@ miss c: I think there was something incorrectly formatted in the
<img ... />that you are using. First, please make sure that you are not using the “Visual” editor but are using the “Code” editor.Second, here is a sample of the first image that you have on your about page:
<img src="http://www.bellaphonic.com/images/clare1.jpg" rel="polaroid" alt="miss clare[me]" />Third, you will want to go to log into the Admin area and go to Options>Polaroid on the Fly. Set “Use Lightbox” to yes. And double the Width and Height.
First of all, I love this plugin.
I do have one question. Is there anyway to set the dimensions of the plugin based on each photo instead of all photos having to be the same size? How often I actually use the plugin will be based on my ability to conform the photo to the dimensions I have set for the polaroid without stretching the photo out of proportion. Is there a way to adjust the polaroid based on each individual photo?
@Jenn: Currently there is no way to set the size of the Polaroid thumbnail on a per image basis. I can add this feature to a future version as I have thought about it before.
However, in regards to the proportion of the photo, I had always assumed that when resizing the thumbnail that one would do so by keeping the same proportions of the frame.png image which is 245×301. Because the Polaroid-o-nizer script uses an image as the frame for the final image the proportions will always be in the ratio of 245×301 so if changed to something like 301×245 the image will look distorted.
If you are trying to resize the thumbnail to something different than that ratio it will always look out of proportion. There really is not way to make the Polaroid-o-nizer script do what you are looking for it to do.
Hi,
I just installed your plugin, and I’m using Wordpress 2.5.
I keep getting “Source URL Incorrect of does not Exist”. But when I click on the picture I get the picture, so it must be correct.
I am using Lightbox JS v2.04 to load the pictures when clicked on.
The server has this GD stuff enabled as far as I can see
Oh, the code thing didn’t go to well.
The PHPinfo tells me GD is bundled with all enabled and with freetype.
@Egon: This plugin also requires that your web hosting provider allow you to make outbound HTTP connections. Some hosting providers do not allow this. If the plugin cannot download the image using PHP (server side execution) then it will return an error stating that the source url is incorrect or does not exist.
Hi,
Thank you for the reply.
Is there a way to check this? I do not have SSH. Can I see that somewhere or is there a test site for this?
What do I need to change in order to have more then 8 capitons…can you make screenshot or somehting similar
@BlackyM: It is not that simple. The reason that I have limited it to 8 characters is due to the font size. it would require multiple edits that I’d rather not go into in detail in a comment. If you are familiar with PHP and would like to know more information about this contact me via the contact link at the top of the page.
I’m not familiar with php :(
But no problem, it’s still nice widget…Then this could be suggestion…little smaller font with more capitons available would be maybe better.
this is very kewl any idea if it could be implemented to pull in random photos from a flickr set? … in a sidebar widget… or best I get in there with a hammmer and monkey wrench and try to figure out how to do it?
thx
RH
I really like this plugin. It still works with v2.6 which is great. The only conflict I have found so far as I test for photo-gallery-plugin conflicts is that it doesn’t like “Lightbox” or “Lightbox2″. Makes a real mess of things if either are activated.
Do you think you will be updating this any time soon?
Idea: photo caption
Pablo
gallery test site = http://tinyurl.com/6z5evw