Random image with pretty photo zoom

The Random image gallery with pretty photo zoom WordPress plug-in which allows you to show random image anywhere in your posts, template files or using widgets. When you click the image it will create the pretty photo zoom effect. You can upload your images directly into the folder or you can set the existing image folder location; this plugin will automatically generate the perfect thumbnail image based on the mentioned width. This plugin is very useful to showcase images randomly to user.

Plugin demo available below click and see the pretty photo zoom effect. Refresh this page and see the another image on sidebar.

Live demo

336x280 11 Random image with pretty photo zoom

Features of this plugin

  • Simple and easy installation.
  • This will create thumbnail image.
  • Display one image on random order.
  • Pretty photo zoom effect on mouse click.

Theme options

  • Dark rounded zoom.
  • Dark square zoom.
  • Light rounded zoom.
  • Facebook zoom.
  • Light square zoom.

Plugin configuration

Method 1

Drag and Drop the Widget : Go to widget page under Appearance tab, Drag and drop R I G W PP Z widget into your side bar. its very easy.

Method 2

Add directly in the theme : Use the below code to add the gallery to your theme files.

<?php if (function_exists (rigwppz_show)) rigwppz_show(); ?>

Method 3

Short code for posts and pages: Copy and paste the given short code into pages or posts.
Short code :

[random-image-pp-zoom dir="DIR1" width="200" theme="1"]

theme =”1″ : dark_rounded
theme =”2″ : dark_square
theme =”3″ : default
theme =”4″ : light_rounded
theme =”5″ : facebook
theme =”6″ : light_square

Installation instruction

Method 1

  1. Download the plugin random-image-gallery-with-pretty-photo-zoom.zip from download link.
  2. Unpack the random-image-gallery-with-pretty-photo-zoom.zip file
  3. Extract the /random-image-gallery-with-pretty-photo-zoom/ folder.
  4. Drop the random-image-gallery-with-fancy-zoom folder into your ‘wp-content/plugins’ folder.
  5. In word press administration panels, click on plug-in from the menu.
  6. You should see your new random image gallery with pretty photo zoom plug-in listed.
  7. To turn the word presses plug-in on, click activate.

Method 2

  1. Go to ‘add new’ menu under ‘plugins’ tab in your word-press admin.
  2. Search random image gallery with pretty photo zoom plugin using search option.
  3. Find the plugin and click ‘Install Now’ link.
  4. Finally click activate plug-in link to activate the plug-in.

Method 3

  1. Download the plugin random-image-gallery-with-pretty-photo-zoom.zip from download link.
  2. Go to ‘add new’ menu under ‘plugins’ tab in your word-press admin.
  3. Select upload link (top link menu).
  4. Upload the available random-image-gallery-with-pretty-photo-zoom.zip file and click install now.
  5. Finally click activate plug-in link to activate the plug-in.

Frequently asked questions

Q1. Plugin setting link?

Dashboard → Setting → R I G W PP Z

Click the above link to update the plugin settings.

Q2. Thumbnail not display?

To create thumbnail the “GD support” must be enabled to your PHP setting (its default enabled mode, if not please check your phpinfo file and contact your server).

Q3. Where to change the thumbnail width?

Go to ‘R I G W PP Z’ link under SETTINGS TAB to update the setting, the height of the image automatically re-sized based on your width.

Q4. Where to upload my images?

After activated the plugin in default it will fetch image from the below location.
wp-content/plugins/random-image-gallery-with-pretty-photo-zoom/random-gallery/

You have to change this folder location to your original location. (Best practice is don’t upload your original image into this folder instead you change this default path to original path)

Download location

http://www.gopiplus.com/work/wordpress-plugin-download/

Related plugins

47 Responses to“Random image with pretty photo zoom”

  1. Fabrizio
    December 14, 2011 at 10:48 am #

    Does it supports vimeo and youtube video also?

    • Admin
      December 18, 2011 at 8:09 am #

      Check my Youtube with fancy zoom plugin.

  2. Mariah
    January 25, 2012 at 9:24 pm #

    Is there a way to center the widget in the sidebar? It has no margin or padding so it’s just jammed into the top left corner of its sidebar box and looks very bad.

    • Gopi Ramasamy
      November 2, 2012 at 2:21 pm #

      You can modify the below method to align the widget images

      function rigwppz_widget($args)
      {

      }

      This is the main method to display the widget

      rigwppz_show();

  3. nathan
    February 24, 2012 at 4:50 am #

    I want to display multiple images on a page, is it possible with this ? it doesnt seem to work adding , only showing one image per page. Is there a way to specify a directory etc from a php template file ? cheers

  4. nathan
    February 24, 2012 at 4:50 am #

    I want to display multiple images on a page, is it possible with this ? it doesnt seem to work adding the code in, only showing one image per page. Is there a way to specify a directory etc from a php template file ? cheers

    • Admin
      February 24, 2012 at 4:54 am #

      for each short code it ll generate one image in the page..

  5. nathan
    February 24, 2012 at 4:57 am #

    cant put short code into php template file ? yes ? can you please give me an example ? thank you

    • Gopi Ramasamy
      November 2, 2012 at 2:31 pm #

      Please find the “plugin configuration” section in the post.

  6. nathan
    February 24, 2012 at 5:18 am #

    or , with short code out side post or page isnt doing anything.. .trying to get random images in header of php file… cheers

  7. nathan
    February 24, 2012 at 5:19 am #

    didnt let me paste code, but do_shortcode(‘[RIGWPPZ=DIR1=200]‘); doesnt work

    • Admin
      November 2, 2012 at 2:23 pm #

      [random-image-pp-zoom dir="DIR1" width="200" theme="1"]

      Please find the new short code.

  8. bangladeshi photos
    February 26, 2012 at 11:43 am #

    I want to display multiple images on a page

  9. Harmony
    March 1, 2012 at 6:24 am #

    Getting error when uploading for another widget called image-widget (for single images):
    Cannot modify header information – headers already sent by (output started at /home/xxxxx/public_html/wp-content/plugins/random-image-gallery-with-pretty-photo-zoom/random-image-gallery-with-pretty-photo-zoom.php:677) in /home/xxxx/public_html/wp-admin/async-upload.php on line 26

  10. Harmony
    March 2, 2012 at 10:51 pm #

    Hi… anyone out there have any ideas? I know this is a .js conflict – I’m just not sure how to resolve it. I cannot disable the conflicting plugins because I need them – I just need to know how to stop the random-image-gallery from loading the duplicate call to jquery (I think). Any advice welcome! Thanks!!!
    Harmony

    • Gopi Ramasamy
      November 2, 2012 at 2:34 pm #

      function rigwppz_add_javascript_files()
      {

      }

      Please check this function to comment/uncomment the JavaScript.

  11. David
    April 2, 2012 at 5:40 pm #

    I don’t understand how this plugin can fail so often when NO changes are made to settings!?! The images pop up in the parent window as an image along and has NO jquery animation button or socials buttons surrounding the picture. I fixed it once a couple weeks ago and now it’s back to showing like a regular image.

    People should REALLY avoid releasing any plugins or scripts until they verify there are no faults!

  12. jacksparrow
    April 22, 2012 at 3:49 pm #

    i agree with David
    it just does not work i think there are some things missing on the server
    my advise to the creator make some kind of howto and add the requirements in this so we know waht to install on the server

  13. Craig
    April 23, 2012 at 3:42 pm #

    Is there a setting that limits the maximum size of the thumbnail?

    I’ve changed the width on the settings page to 999 but I can’t seem to get an image larger that about 500 pixles.

    What I’m trying to do is set the thumbnail to 640 but I don’t seem to be able to do so?

    Any suggestions?

    Thanks!

    • Craig
      April 29, 2012 at 12:43 am #

      Anybody? Changing the setting page max width doesn’t seem to be working?

      Is there something in CSS or somewhere that prevents a larger image?

      Thanks!

      • M Waters
        July 9, 2013 at 5:26 pm #

        I was having the same issue and edited the “crop-random-image.php” file within the plugin folder

        if($max_width > 500)

        {

        $max_width = 500;

  14. Krisna
    May 10, 2012 at 10:49 pm #

    Is there a way to center the image?

  15. Elizabeth Mero
    June 26, 2012 at 7:47 pm #

    Please explain how and where to download my images so this feature can work for me. I’ve spent hours trying to figure this out.

    “After activated the plugin in default it will fetch image from the below location.
    wp-content/plugins/random-image-gallery-with-pretty-photo-zoom/random-gallery/

    You have to change this folder location to your original location. (Best practice is don’t upload your original image into this folder instead you change this default path to original path)”

    Again, don’t know were to retrieve my images. I don’t understand this. This plug looks great, but can’t use. Please help.

    • Admin
      June 27, 2012 at 1:31 am #

      You can upload your images into the default location (using any FTP) or you can change this path(Where you have your images).

  16. TheZ
    July 2, 2012 at 3:45 am #

    Could you please either make an option, or have the plugin default to include all sub-directories? Each month the images in WordPress are stored in a different directory, but always under the same higher directory.

    If the widget could be filled with an image from a top level directory downward, all uploaded images-regardless of month-would be used for a random choice.

    Example:
    July: wp-content/uploads/2012/07/
    August: wp-content/uploads/2012/08/

    Each webmaster can make their own permalink structure, but they are all under a single, higher level directory. Ideally (in the above example) we wold like to point the plugin to:

    wp-content/uploads/

    As each month passes, there is no need to have 5 directories, then 6, then 7, etc. until it runs out. Right now, the plugin has 5 named directories.

    Thanks for a great idea! I can’t wait to see it take on all my uploads!

    tarot :)

    • Willcheck
      January 13, 2013 at 12:00 pm #

      Yes i find this options on plugin . Please send me php code or plugin whit this function. Thanks

  17. KDogg
    August 17, 2012 at 1:28 am #

    I just started evaluating your plugin a few days ago and definitely like how “clean and simple” it is. I wonder if you have seen any issues related to different web browsers? The plugin works fine on my site using Google Chrome. However when I use IE, and click on an image to view it full size, the image floats under a video clip that is on the same page. The website in question is TMYG.org

    • Gopi Ramasamy
      November 2, 2012 at 2:37 pm #

      I have tested this same URL in the IE browser and it is working fine. i think your issue coming from your theme file.

  18. Robert
    September 11, 2012 at 8:10 pm #

    I’m using your fantastic plugin and I have a question. Is there some way to disable the thumbnail from linking to a “larger” image? In other words, I just want to display the thumbnails without having them be links. Make sense?
    Thanks!

    • Admin
      November 2, 2012 at 2:14 pm #

      If you need simple image display, you can find my another plug-in. many image display plug-in available in the plug-in list.

  19. Stefan
    September 20, 2012 at 10:37 pm #

    Hi,
    after the plugin worked without moaning about a year now I’ve got an error message instead of random pictures – maybe because I made an WP upgrade to 3.4.2. Any idea?

    Warning: dir(wp-content/plugins/random-image-gallery-with-pretty-photo-zoom/random-gallery/brotminiaturen/) [function.dir]: failed to open dir: No such file or directory in /www/htdocs/w00c1909/WordPress/wp-content/plugins/random-image-gallery-with-pretty-photo-zoom/select-random-image.php on line 32

    Fatal error: Call to a member function read() on a non-object in /www/htdocs/w00c1909/WordPress/wp-content/plugins/random-image-gallery-with-pretty-photo-zoom/select-random-image.php on line 35

    Thanks, Stefan

    • Admin
      November 2, 2012 at 2:12 pm #

      Please check your FTP and confirm the folder location.

  20. deno
    October 31, 2012 at 3:38 pm #

    How to add the photo title?

    • Admin
      November 2, 2012 at 2:09 pm #

      At present no option available to add tile..

      • deno
        November 5, 2012 at 2:35 am #

        I love this plugin and if the photo can add the title then it is great! Because like light box also have the photo title.

  21. Admin
    November 2, 2012 at 2:11 pm #

    Hi duna,

    To differentiate, In the post I have added title for the demo and advertisement. happy?

  22. Nicolai
    November 23, 2012 at 8:53 pm #

    Hi.

    A have installed your great plugin, but when i press the image to enlarge, the picture shows up behind the header so i cant see the top half of the picture and cannot hit the X for closing the picture…

    How can i force the picture to stay in front of everything on the side

  23. Michael
    January 18, 2013 at 6:31 pm #

    Awesome plugin – does exactly what I need and more … except one thing. Can you point me in the right direction for changing the ‘background’ colour? I need to display ‘transparent’ gifs … my site background is white, but the plugin renders a black background to the image, which is ‘seeping’ through. I’ve tried hunting through the CSS, php files, etc. for #000 but I’ve run out of things to change and it’s still black!

    Any help / pointers very gratefully received!

    • Wouter
      February 27, 2013 at 10:07 pm #

      Did you find out how to do this yet?

    • Brian Mattocks
      March 22, 2013 at 10:59 pm #

      The imagejpeg() function does not support transparency as jpegs don’t support transparency. I’ve updated the file crop-random-image.php with the following code (i’m using PNG’s.) In theory there should be a way to output to the incoming file type but I’m not really a programmer, just an enthusiast.

      $gCF_abspath = dirname(__FILE__);
      $gCF_abspath_1 = str_replace(‘wp-content/plugins/random-image-gallery-with-pretty-photo-zoom’, ”, $gCF_abspath);
      $gCF_abspath_1 = str_replace(‘wp-content\plugins\random-image-gallery-with-pretty-photo-zoom’, ”, $gCF_abspath_1);

      $rigwppz_dir = $_GET["DIR"];

      $max_height = 1000;
      $image = $gCF_abspath_1 . $rigwppz_dir . $_GET["IMGNAME"];
      $max_width = $_GET["MAXWIDTH"];

      if($max_width > 500)
      {
      $max_width = 500;
      }
      if (strrchr($image, ‘/’)) {
      $filename = substr(strrchr($image, ‘/’), 1); // remove folder references
      } else {
      $filename = $image;
      }

      $size = getimagesize($image);
      $width = $size[0];
      $height = $size[1];

      // get the ratio needed
      $x_ratio = $max_width / $width;
      $y_ratio = $max_height / $height;

      // if image already meets criteria, load current values in
      // if not, use ratios to load new size info
      if (($width <= $max_width) && ($height <= $max_height) ) {
      $tn_width = $width;
      $tn_height = $height;
      } else if (($x_ratio * $height) < $max_height) {
      $tn_height = ceil($x_ratio * $height);
      $tn_width = $max_width;
      } else {
      $tn_width = ceil($y_ratio * $width);
      $tn_height = $max_height;
      }

      /* Caching additions by Trent Davies */
      // first check cache
      // cache must be world-readable
      $resized = 'cache/'.$tn_width.'x'.$tn_height.'-'.$filename;
      $imageModified = @filemtime($image);
      $thumbModified = @filemtime($resized);

      header("Content-type: image/jpeg");

      // if thumbnail is newer than image then output cached thumbnail and exit
      if($imageModified<$thumbModified) {
      header("Last-Modified: ".gmdate("D, d M Y H:i:s",$thumbModified)." GMT");
      readfile($resized);
      exit;
      }

      // read image
      $ext = substr(strrchr($image, '.'), 1); // get the file extension
      switch ($ext) {
      case 'jpg': // jpg
      $src = imagecreatefromjpeg($image) or notfound();
      break;
      case 'png': // png
      $src = imagecreatefrompng($image) or notfound();
      break;
      case 'gif': // gif
      $src = imagecreatefromgif($image) or notfound();
      break;
      case 'JPG': // jpg
      $src = imagecreatefromjpeg($image) or notfound();
      break;
      case 'PNG': // png
      $src = imagecreatefrompng($image) or notfound();
      break;
      case 'GIF': // gif
      $src = imagecreatefromgif($image) or notfound();
      break;

      default:
      notfound();
      }

      // set up canvas
      $dst = imagecreatetruecolor($tn_width,$tn_height);
      imagecolortransparent($dst,imagecolorallocatealpha($dst, 0, 0, 0, 127));
      imagealphablending($dst, false);
      imagesavealpha($dst, true);
      imageantialias ($dst, true);

      // copy resized image to new canvas
      imagecopyresampled ($dst, $src, 0, 0, 0, 0, $tn_width, $tn_height, $width, $height);

      /* Sharpening adddition by Mike Harding */
      // sharpen the image (only available in PHP5.1)
      /* if (function_exists("imageconvolution")) {
      $matrix = array( array( -1, -1, -1 ),
      array( -1, 32, -1 ),
      array( -1, -1, -1 ) );
      $divisor = 24;
      $offset = 0;

      imageconvolution($dst, $matrix, $divisor, $offset);
      }
      */
      // send the header and new image
      imagepng($dst, null, -1);
      imagepng($dst, $resized, -1); // write the thumbnail to cache as well…

      // clear out the resources
      imagedestroy($src);
      imagedestroy($dst);

  24. Michael
    January 18, 2013 at 8:51 pm #

    OK … second question if I may … is there a way to make the href point to a page rather than to the image location? Thought I’d cracked it, but instead of loading the page it tries to find an image with the path name … and fails, obviously! I’m guessing there’s something clever somewhere that I’m not looking for … just changing the basic ‘href’ path isn’t working.

  25. cliff musante
    February 15, 2013 at 9:29 pm #

    I’ve just installed your plug-in today, and after searching through all of the plug-ins that randomize images, I’m happy to say that yours is the most straightforward, and it actually works. Bravo.
    Now, I need to be able to better manipulate the images, and need to be able align them to L, Center or R.
    I’m expecting to have 4 different sets of random pictures, located in 4 different directories. Can you explain how, using short codes for inserting the image into a page, I can apply formatting to the picture to be aligned Lt,Ctr,Rt?
    Keep in mind that each of the directories may require different alignment.
    Thanks,

  26. Marcel
    March 13, 2013 at 11:03 am #

    Installed plugin and tested it. Strange: why does the widget show different parts of the pictures and why are they sometimes cropped??? I want the pictures to be shown as a thumbnail and when clicking on them a bigger one pops up. Now it is sometimes that only half of the picture is shown as a thumbnail and when clicking on it, a picture of only 300px wide is shown. I haven’t uploaded a picture of that width only one with a width of 600px, and that’s the one I want to be shown!
    Doesn’t seem to work very well… I think I’ll search for another, better random image widget.
    Has anyone got an answer to this strange behaviour?

  27. Brian Mattocks
    March 22, 2013 at 11:38 pm #

    My theme comes with some standard widget options that don’t show up in this widget. Any ideas? (options like only show this widget on the front page).

  28. Bill
    April 1, 2013 at 1:15 am #

    For some reason I can’t seem to get this widget to work, I have checked and the GD library is on, at first I was getting a lot of path errors, I have eliminated them but I can’t get it to load an image. I get “Image cannot be loaded. Make sure the path is correct and image exist” I have tried using the ‘document root’ path as well as just “photos/” and both give the same result.

    Any help would be appreciated
    Thanks
    Bill

  29. thomas morley
    April 24, 2013 at 3:02 pm #

    I have the plugin working quite well but I wonder can, I have the light box scrolling through all the images that I have placed in the random-gallery folder ?

    I have added prettyphoto media plugin as well and it has given me face book like button and twitter, so if I could add a title and have it scrolling through all the pictures in the folder it would be perfect.

    One last thing what are the “Image directory (DIR1)”: fields for? cant see what they do…

    Thank you

    • Michael
      June 9, 2013 at 10:46 am #

      Thomas – did you resolve this? Thought I’d log an answer, at least that way anyone else posing the same question can see it.

      DIR1, DIR2, DIR3 etc. means you can have up to five ‘sets’ of images, in the different directory locations that you enter in these fields. You can then specify which directory to use where you specify the short code. So on the same (or different) page(s) you can have – for example – a randomly chosen ‘blue’ pic, a randomly chosen ‘green’ pic, a randomly chosen ‘pink’ pic, etc.

      However, if you then also wanted to insert a random pic that is blue OR green OR pink, you’d need to have all of the blue, green and pink pix in a fourth directory.

Comments closed due to heavy spam (back soon). If you have any query please use my contact form click here and mention your plugin name.