Plugin Directory

Test out the new Plugin Directory and let us know what you think.
!This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Random Image widget

Display a random image from a directory located on the webserver

  1. Download and unzip random-image.zip.
  2. Place random-image.php in your blog's plugin subdirectory (e.g., /wp-content/plugins/).
  3. Create a new subdirectory to hold your images (random-image is the recommended name for this directory).
  4. Activate the plugin from the Plugins tab of your blog's administrative panel.
  5. Go to the Widgets page from the Presentation tab.
  6. Click the 'Add' link on the widget to add the widget to the appropriate sidebar.
  7. Click the 'Edit' link on the widget's placeholder to open the settings form.
  8. Use the form to adjust any of the visual settings to fit your theme and preferences and save the sidebar settings. Be sure the directory points to the folder you are using to store your images. If you don't want the plugin to display in the sidebar, uncheck the "Show widget in sidebar" option (you can still use the widget to display images in posts or elsewhere in your page.)
  9. Click the 'Save' button on the settings form.
  10. Click the 'Save Changes' at the bottom of the Current Widgets section. You should be able to see the sidebar on your front page.
  11. If you would like to have multiple copies of the widget on your blog, simply click the 'Add' button again. At this time, you can only use one copy of the widget active if you use it outside of the sidebar.
  12. To display in a post or page, add a line in your post that says (randomimage).
  13. To display elsewhere in a page, you can call the display function in the appropriate php file of your theme using the function echo_random_image().

Requires: 2.5 or higher
Compatible up to: 2.7
Last Updated: 8 years ago
Active Installs: 2,000+


2.5 out of 5 stars


Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.

0,1,0 43,7,3