Help Center

Images Are Not Displayed Correctly When Logged Out

Images Are Not Displayed Correctly When Logged Out

Modified on: Tue, 18 Oct, 2022

Images are loading fine when logged in but they do not appear when logged out

This issue might happen with the Image Comparison and Accordion widgets. The reason for that is the
incorrect sequence of script connections. Below is the error that you can see in such cases:

imagesLoaded error in the console
  1. Go to the WordPress Dashboard.

  2. Open the Appearance tab and click Theme Editor.

  3. Select the child theme.

  4. Proceed to Theme Functions (functions.php).

  5. Add the following code to functions.php:

    add_action( 'init', function(){
    global $wp_scripts;
    $script = $wp_scripts->query( 'imagesloaded', 'registered' );
    if ( ! $script ) {
    if ( ! in_array( 'jquery', $script->deps ) ){
    $script->deps[] = 'jquery';
    } );
    inserted code into the theme functions.php file
  6. Save the changes.

Was this article helpful?

Need help?

Ask Facebook community

Get answers from 22K Crocoblock Community experts from all over the world.

Start a live chat

Ask question to support agent and share its details via chat messages.