#6763 closed defect (bug) (no action required)
Avatar Photo Doesn't Show in Image Cropper with Lazy Load plugin activated
Reported by: | brianbws | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Extended Profile | Keywords: | |
Cc: |
Change History (3)
#2
@
9 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
@brianbws I hope @dcavins solution gives some idea of a solution. I don't think there's anything BuddyPress can do here because of the lack of standards in this area around WordPress plugins/themes
#3
@
9 years ago
Yeah, I've been using a workaround, but it's not a solution. Was hoping for a better way.
<?php /* turn off lazy load on avatar uplaod page */ add_filter( 'lazyload_is_enabled', 'bws_turn_off_lazyload_on_avatar_upload' ); function bws_turn_off_lazyload_on_avatar_upload( $enabled ) { if ( bp_is_change_avatar() || bp_is_group_admin_screen( 'group-avatar' ) ) $enabled = false; return $enabled; }
Note: See
TracTickets for help on using
tickets.
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
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.