I’ve just put the finishing touches on the latest version of the Random Image Plugin that I originally released in the summer. This plugin will allow you to produce an <IMG> tag containing a randomly selected image from a folder of your choice on any wordpress page (or post if you allow php).
The two biggest features in this version are:
- Automatic discovery of your Wordpress Folder: One of the biggest barriers to entry for the non-technical folks who tried to use this plugin was a lack of knowledge (or access) for finding the physical path to the Wordpress installation. The plugin will now automatically detect and use this path.
CAVEAT: If you currently point your plugin at a folder which is outside of your wordpress installation, you will need to move that folder to use the v1.2.0+ versions of the plugin. - Scaling/Sizing of the Displayed Images: One of the most requested features from the first iteration of the plugin was the ability to resize or scale images to fit in a particular location. With older versions, if you wanted all the images to display at the same size or proportions then you needed to resize them all prior to uploading. Well this is no more! Now you can upload tons of randomly-sized images and the plugin will take care of the dirty work (including the calculation of just how much to scale-to-fit.
I’d like to take the opportunity to thank everyone who has downloaded the plugin, and particularly those who have taken the extra time to send me feedback. As of this release the plugin has been downloaded over 2,400 times which far exceeds anything I thought I would accomplish.
So give this plugin a shot, and let me know if it works out for you!
Tags: Blogging · Development · Downloads · Open Source · Programming · Web 2.0 · Wordpress Plugins91 Comments
Thanks very much for a great plugin. Keep up the good work!
[...] Random Image Selector – Randomly Selects a Image from your Image folder, scales it using GD and then you customize its output. I could have used Awsom PIxGallery’s Widget but this one was a better choice for the front page. I also needed a smaller size picture then the one Awsom is producing in other galleries. [...]
Thank you
[...] Random Image Selector: 从一个指定的文件夹里面随机显示其中的图片. [...]
Hi, I just installed this plugin and it is working great. It’s just what I was looking for.
I was wondering, however, if there is a way to upload the images to the random image folder via WordPress? The person I am making the site may not be able to upload to the designated folder using a FTP program.
Thanks!
Hello,
Like Carla I also believe that I have installed and configured the plugin properly and placed the necessary code in my sidebar but nothing appears?!!?
What could I be missing?
In options the path that is being auto generated is:
/home3/pjewett/mactutorial-www/wordpress/
and I’ve added “wp-content/uploads/”
and the URL path is:
http://mactutorial.com/wordpress/wp-content/uploads/
@Phil: This is a result of the images being stored in subfolders. Currently the plugin doesn’t support nested subfolders. This is a feature planned for a later release.
[...] 随机图片插件Random Image Selector: 从一个指定的文件夹里面随机显示其中的图片. Random Image widget: [...]
Thanks for the work you made.
i would suggest one thing:
you create a line like this:
echo ”;
}
i wish if u still continue to work on future releases you ad the ability to click on the picture and open a bigger window with a larger picture.
i use your plug to display a random thumbnail, i just wish i click on it and display the full picture.
eg: thumbnails should be ex dir : xxx/tmb/ and full xxx/full/ and just random on the tmb dir but display the same name picture on full/ dir
anyway thanks for your work
I try to use this interesting plugin but no way. I introduce the pathname of the folder with the images but it is never found. Is there any problem with Mac OS (I am using Mac OS X 10.4.11. )?. Thanks
hey everyone
keith, awesome plugin… works beautifully. i, like a few others, was really interested in getting the images to link. i didn’t hook up any database functionality but i did get the thumbnails to link to the full size image by:
editing randomImage.php
replace line 224 which looks like this:
echo ”;
with something like this:
echo ““;
hope that helps someone out there, and thanks again
apologies… code above should’ve came out better, perhaps this will work:
replace linke 224 which looks like this:
echo ”;
with this:
echo ““;
Having a problem. I can’t get the admin options to display in the admin template after I’ve installed the plugin. Thus I can’t set my directories or options for the plugin.
I’m using WP 2.51 on a server and on a localhost install. Neither works.
I’ve used this plugin before on other sites and and never had this problem.
@Goofy Best guess is that another plugin may be interfering with it. Try turning off other plugins until they’re all disabled, or until it works.
Keith,
Great plugin!…….is it possible to have this plugin pull more than 1 random image?……i would like to show 5 random images on my homepage….i know it’s probably a tweak of the coding somewhere…..any help?
thanks
tony
@tony thanks for the feedback. That’s certainly something I can look at for a future version.
Time’s been tight lately and I haven’t had much time to do plugin development, but I’ll see what I can do…
[...] Random Image Selector [...]
[...] a precisar de um já com widgets. Depois, acrescentei mais alguns plugins que me davam jeito, o Random Image Selector para finalmente por ali ao cantinho as imagens da minha galeria, ainda não faz o que quero mas já [...]
[...] Random Image Selector: 从一个指定的文件夹里面随机显示其中的图片. [...]
Hi Keith,
I posted a question a couple of months ago (posted march 1st). I stopped development of the site I mentioned because of other work but am now getting back to it. The issues I mentioned still persist (obviously it doesn’t solve itself…) .
You (probably) overlooked my posts last time…
Could you have a look at them? Thanx in advance!
Some additional details:
- I am now using WP 2.6.1
- Does the directory have to be in the ‘wp-content’ folder?
Grtz!
CID
Hey K,
I have a question for you about this WordPress random image plugin. I am using it generate a random header image as a background because I have text that needs to overlap it. I modified the last couple lines of the plugin code to generate “url(” instead of an image tag so I can use it inside a CSS rule in the header.php template file of my theme. It seems to work fine about 50% of the time. The other 50% of the time no image will load. When I look at the page source of a failed load, I noticed that the image directory has a “._” in front of the image file that isn’t supposed to be there (i.e. it reads “…/._ucheader01.jpg” instead of …/ucheader01.jpg”. This is what causes the image to not load properly. You can visit my test site to see what I mean: http://upstatecruisers.net/test_blog
Do you know why this is happening? It occurred before I edited the plugin code as well, and if it matters the folder that contains the images is in the theme folder.
Thanks for your help, I look forward to being able to use it!
[...] плагина: Keith Murray (http://kdmurray.net/) Страница плагина: http://kdmurray.net/2007/12/09/random-image-selector... Рассматриваемая версия: 1.2.5 от 02.08.2008 Совместимость с [...]
Help! I installed the plugin and activated it and I don’t have an “options” screen. The only other plugin I have is wordpress stats. What should I do?
@Stephanie: In newer versions of WordPress the menu you want is called “Settings”. There should be a “Random Image” menu item under the settings menu that you can use to configure the plugin.
This is exactly what I was looking for!! Thanks! One question… is it possible to have the random images wrap inside the paragraph? Thanks!
I installed the plugin end worked. Thanks
[...] Random Image Selector: 从一个指定的文件夹里面随机显示其中的图片. [...]
[...] asked, David will install the Random Image Selector so that photos will rotate each time a web page is refreshed. This is what EVAC uses for their [...]
Amazing! Been looking for a plugin like this for weeks. Thanks! How can I adapt this so it rotates the footer as well. I saw in the comments that the code needed to be tweaked a little to make it work. Can you give me some details???
Thanks again for the great plugin!!!
Hi Keith, I’m getting an error because of division by zero.
/randomImage.php on line 212 and line 213 are causing this error.
Would you know how to fix this?
Thanks a lot,
Oh, the reason I had that error because I messed up the image scaling settings.
It’s all good now
Thanks,
[...] Random Image Selector: 从一个指定的文件夹里面随机显示其中的图片. [...]
Great Plug-In! I’ve been looking for something like this for awhile. This may be a stretch but I am using this Plug-In to randomize my body background and I was wondering if it was possible to make a HEX color randomize with each background image?
I cant figure out how to get your plug in to work. I think I am putting the address in wrong.
What should I do?
The link on WordPress.org to download this plugin is returning a file not found error.
[...] can’t believe it’s been one year since the last major release of the random image selector. Since the plugin’s initial inception last summer it has received a fair amount of [...]
[...] thank you to everyone who has downloaded the plugin in the past, and to those who continue to comment on the blog. Your suggestions are all valued and I’ll be working some of them into the upcoming 2.0 [...]
hi Keith,
thanks for your work and plugin. it works perfect.
is there a way to make some easy modifications on the code, so that`s possible to display more than one image at the same time – !?
best wishes and a nice holiday season.
nilson
There’s not a super-easy way without tweaking the code, but you can always call the “generateRandomImgTag()” function more than once. Each call should return another image.
Comments on this post are now closed. Please feel free to comment on the post for version 1.5.
Thanks — K.
[...] 随机图片插件 Random Image Selector: [...]