[buddypress-trac] [BuddyPress Trac] #6763: Avatar Photo Doesn't Show in Image Cropper with Lazy Load plugin activated

buddypress-trac noreply at wordpress.org
Wed Dec 9 16:26:40 UTC 2015


#6763: Avatar Photo Doesn't Show in Image Cropper with Lazy Load plugin activated
----------------------------------+------------------------------
 Reporter:  brianbws              |       Owner:
     Type:  defect (bug)          |      Status:  new
 Priority:  normal                |   Milestone:  Awaiting Review
Component:  Component - XProfile  |     Version:
 Severity:  normal                |  Resolution:
 Keywords:                        |
----------------------------------+------------------------------

Comment (by dcavins):

 I had the same problem with the very good BJ Lazy Load
 (https://wordpress.org/plugins/bj-lazy-load/), and the fix was to add an
 exclude to the plugin's "should I run" filter: Like

 {{{#!php
 <?php
 add_filter( 'bj_lazy_load_run_filter', 'skip_lazy_load', 12 );
 function skip_lazy_load( $run_filter ) {
         // Disable Lazy load on user and group avatar upload/crop pages.
         if ( bp_is_group_creation_step( 'group-avatar' )
                 || bp_is_group_admin_screen( 'group-avatar' )
                 || bp_is_user_change_avatar() ) {
                 return false;
         }

         return $run_filter;
 }
 }}}

 I'm not sure that this is a problem that BP can fix, since the various
 lazy load plugins are operating on the images via JavaScript, and aren't
 built to bind to images added after page load (but the php portion of the
 script runs anyway, stripping the images in the code returned by the AJAX
 call--which seems like a plugin problem, that could maybe be avoided by
 doing a `DOING_AJAX` check).

 Anyway, I hope the plugin you're using has a similar filter to control
 when it acts.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6763#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list