WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Featured image thumbnail error

[Resolved] Featured image thumbnail error

  • FotogroepGendringen
    Member

    @fotogroepgendringen

    Hello,

    The problem:
    When I make a new post and in that one I add a featured image, i get, for a second, a smaller thumbnail where I can click on to see the bigger version of it, but when I refresh the post (F5) the smaller thumbnail will disappear into a black square with a icon of a broken document in it. I can still click on it to see the bigger version.

    See:

    Does anyone know what i´m doing wrong?

Viewing 1 replies (of 1 total)
  • FotogroepGendringen
    Member

    @fotogroepgendringen

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    Solved!

    On the next website I found the answer. http://www.agentwp.com/fix-thumbnails-not-working-in-a-wordpress-theme-from-elegant-themes

    The parts that worked voor me were:

    If thumbnails are still not working on your website, then login via FTP to your web server and make sure that the uploads and the et_temp folders are fully writable, that is, they have 755 or 777 permission depending upon the security configuration of your web server. Try 755 first as its more secure.

    and:

    Appearance > Editor in your WordPress dashboard, and select custom-functions.php file from right side to edit.

    Find the following code in this file, and comment the marked lines,

    if ( false !== get_option( 'et_images_temp_folder' ) ) return;
    $uploads_dir = wp_upload_dir();
    $destination_dir = ( false === $uploads_dir['error'] ) ? path_join( $uploads_dir['basedir'], 'et_temp' ) : null;
    if ( ! wp_mkdir_p( $destination_dir ) ) update_option( 'et_images_temp_folder', '' );
    else {
    update_option( 'et_images_temp_folder', preg_replace( '#\/\/#', '/', $destination_dir ) );
    update_option( 'et_schedule_clean_images_last_time', time() );
    }

    The edited code snippet will look like this,

    #if ( false !== get_option( 'et_images_temp_folder' ) ) return;
    $uploads_dir = wp_upload_dir();
    $destination_dir = ( false === $uploads_dir['error'] ) ? path_join( $uploads_dir['basedir'], 'et_temp' ) : null;
    #if ( ! wp_mkdir_p( $destination_dir ) ) update_option( 'et_images_temp_folder', '' );
    #else {
    update_option( 'et_images_temp_folder', preg_replace( '#\/\/#', '/', $destination_dir ) );
    update_option( 'et_schedule_clean_images_last_time', time() );
    #}

    Now save this file and go to your homepage and reload the page. The thumbnails will now appear fine.

    And it works!

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Featured image thumbnail error’ is closed to new replies.