How does the plugin work

This plugin is designed to display a randomly selected image and for a specified period of time regardless if the page is refreshed or closed.

The settings page has three options.

  1. Same image for all users
    The options here are:

    Yes – display the same image for all users
    No – display a different image to each individual use

  2. Location of the images
    The location of the images relative to the site root folder e.g. wp-content/uploads/[location-of-images]
    No slash at the beginning or at the end of the input
  3. Days to retain image
    This is a multiplier needed to determine for how long to image is to be displayed. The next day/time to display the image is calculated by multiplying 86400 by multiplier and adding it to the current datetime (0.01 is roughly 15 minutes).

Note:

These are all the image types that are able to be displayed:

  • avif or AVIF
  • gif or GIF
  • jpeg or JPEG
  • jpg or JPG
  • png or PNG
  • svg or SVG
  • webp or WEBP

For the sake of the demo pages the Days to retain image is set for about one minute.  

The plugin can be downloaded from here

Usage:

Place one of the shortcodes shown below on a post or page (note: if that you must remove the leading and trailing space)

Simple option – let program provide all the default settings — for demo click here

[ random-image-display ]

You control the width and height (can be controlled with “auto”, “%” or “px”) — for demo click here

[ random-image-display width=”100%” height=”auto” ]