Images not loading in slider or preview

johnmcole's Avatar


16 Feb, 2019 12:36 AM


We're having an issue where images are not loading in the sliders.

An example can be seen in at the bottom of the page. It comes up with a blank slider with the bullets without images.

I do not see any error messages in the browser console. When I preview the slider in the plugin, it also does not load the images.

Not sure what is going on here. Any thoughts on what might be causing this?


  1. Support Staff 1 Posted by Dmitry Semenov on 16 Feb, 2019 06:44 AM

    Dmitry Semenov's Avatar


    The issue could be related to

    Go to Image Options section of the slider and remove values from Image width and Image height to make plugin use default WordPress "large" size, or define custom size.

  2. 2 Posted by johnmcole on 16 Feb, 2019 07:46 PM

    johnmcole's Avatar

    Hi Dmitry,

    Yes, that looks like the issue. Our slider display size is 970x650, however we're using 2x images for retina display so the Main Image Width and Height was set to 1940x1300.

    When I remove those values from the Main Image dimensions, the images now load - however, the resolution is poor on retina displays.

    What would you recommend as a solution for this?

    Thank you,

  3. Support Staff 3 Posted by Dmitry Semenov on 17 Feb, 2019 02:42 PM

    Dmitry Semenov's Avatar

    You may add a custom WordPress image size as described here -

    For example, to change default slider image size you can add:

    function royalslider_change_image_size($sizes) {
        $sizes['large'] = 'your-custom-size-name';
        return $sizes;
    add_filter( 'new_rs_image_sizes', 'royalslider_change_image_size' );
  4. 4 Posted by johnmcole on 17 Feb, 2019 04:22 PM

    johnmcole's Avatar

    Hi Dmitry,

    Thank you. However, what's interesting is that this issue just appeared and is most of our sliders (around 2000) on our production site. Something must have changed to cause this.

    Our staging environment which is a near clone of our production environment does not have this issue. One difference between the two environments is caching. The staging environment does not have caching, while the production env is using WP Engine's caching system.

    The production server may also have a different webserver configuration than staging.

    Are there any dependencies like (resizing) scripts, libraries or API calls that are being made to load these images? I saw that RoyalSlider uses Aqua Resizer script for resizing of images and needs PHP GD or ImageMagick.

  5. Support Staff 5 Posted by Dmitry Semenov on 17 Feb, 2019 04:48 PM

    Dmitry Semenov's Avatar

    There were no changes to image resizing in recent updates of the RoyalSlider.

    If you're experienced in PHP, you may try to debug aq_resize function, it's the inside file classes/NewRoyalSliderMain.php.

  6. 6 Posted by johnmcole on 17 Feb, 2019 07:19 PM

    johnmcole's Avatar

    Thank you. I spent some time debugging the aq_resize function as suggested and it looks like the problem is occurring in line 536 of the file:

    //check if img path exists, and is an image indeed if( !file_exists($img_path) OR !getimagesize($img_path) ) return false;

    If I comment out the above line, the slider preview and display works as before.

    It looks like its not finding the file. An example img_path being passed in is:

    This file does exist in the uploads directory and can be seen here:

    Any thoughts on what could have changed to cause the above line to return false?

  7. Support Staff 7 Posted by Dmitry Semenov on 17 Feb, 2019 10:23 PM

    Dmitry Semenov's Avatar

    Hard to tell, both file_exists and getimagesize are native PHP functions. Make sure that PHP itself is updated.

  8. 8 Posted by johnmcole on 18 Feb, 2019 10:04 PM

    johnmcole's Avatar

    I was able to identify the cause. There was a file system change at the web host which moved the uploads to another server and the absolute file paths no longer worked.

    I'm in the process of resolving it at the host now. Thank you for your help troubleshooting this.

  9. Support Staff 9 Posted by Dmitry Semenov on 19 Feb, 2019 12:18 PM

    Dmitry Semenov's Avatar

    I see, thanks for sharing the solution.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac