WordPress.org

Ready to get started?Download WordPress

Forums

BuddyPress
Serious Problem With Images (3 posts)

  1. gh0zt
    Member
    Posted 2 years ago #

    The latest version of BP is generating corrupt -bpthumb.jpg and -bpfull.jpg images for groups (and maybe other things) every time.

    These images cannot be displayed in IE8 and IE9 or opened with graphic editing tools such as photoshop.

    http://wordpress.org/extend/plugins/buddypress/

  2. gh0zt
    Member
    Posted 2 years ago #

    Found a way to fix it but I don't know how to quickly regenerate all the existing thumbnails. Does anyone know a quick way to regenerate all the thumbnails after fixing the php script below?

    1. Locate this file
    /wp-content/plugins/buddypress/bp-core/bp-core-avatars.php

    2. Locate this code in the file

    // Set the full and thumb filenames
    $full_filename = wp_hash( $original_file . time() ) . '-bpfull.jpg';
    $thumb_filename = wp_hash( $original_file . time() ) . '-bpthumb.jpg';

    3. Change the code to:

    // Set the full and thumb filenames
    $full_filename = wp_hash( $original_file . time() ) . '-bpfull.png';
    $thumb_filename = wp_hash( $original_file . time() ) . '-bpthumb.png';

    4. Uploading a new avatar and cropping it will now create a .png version, the images will now work properly in IE8/9

    5. How can I recreate all the existing thumbnails quickly?

  3. gh0zt
    Member
    Posted 2 years ago #

    I fixed it by running the script below from:

    /wp-content/uploads/group-avatars

    find . -type f -name '*.jpg' -print0 | while IFS= read -r -d '' f; do
    mv -- "$f" "${f%.jpg}.png"
    done

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.