Notifications
Clear all

wpForo 1.x.x [Closed] Round Avatars instead of Oblong?

12 Posts
3 Users
4 Reactions
5,357 Views
Robert
Posts: 10591
Admin
(@robert)
Support Team
Joined: 9 years ago

wpForo only uses one file, it doesn't keep copies. This also happens when a very large image is uploaded for avatars. In this case the image manager functions (cropper and resizer to 150x150) may not be able to work, the limit of memory doesn't allow to do the job.

Posts: 56
Topic starter
(@glowball)
Trusted Member
Joined: 7 years ago

If I had to guess, I'd say that wpForo is uploading the original image (sometimes with uppercase JPG) and then resizing it with a lowercase jpg.  In UNIX, that's two different files, of course.  Then it's calling the image but it's accidentally getting the original JPG instead of the intended jpg.

To fix my current issues, I simply deleted the JPG images and renamed the jpg to JPG to get it to work.  There must be a line of code somewhere that should be lowercasing the upload (or uppercasing the new thumbnail) to make sure the upload is replaced by the thumbnail.  

The issue is that the utility is allowing the original and thumbnail to both exist when the extension is originally capitalized.  You said it only uses one file, but this is not true when the user has an uppercase file extension.

Can the fix be applied in the next version?

Posts: 111
(@nando4)
Estimable Member
Joined: 8 years ago

@Glowball, great find there. I confirm/wp-content/uploads/wpforo/avatars has two different avatar filenames:

 

  • [avatar].jpg - eg: 8k file
  • [avatar].JPG - eg: 1MB file

 

Looking at the wp_wpforo_profiles -> userID, it has the incorrect [avatar].JPG file listed against a userID.

The ramnification of this having the Online Members widget takes ages to load when it encounters these 1MB files. Also loading a topic takes longer since it shows [avatar].JPG against their post.

@Robert, please submit a fix request: refer to [avatar].jpg in the database table wp_wpforo_profiles -> userID.

 


In the meantime, I've applied Glowball's workaround: in /wp-content/uploads/wpforo/avatars

  1. identify *.JPG and *.PNG files with a matching lowercase version
  2. delete matched *.JPG and *.PNG files
  3. rename *.jpg and *.png to be *.JPG and *.PNG

 

This should improve forum responsiveness since will now load 8kb instead of up to 1MB avatar files.

 

Robert
Posts: 10591
Admin
(@robert)
Support Team
Joined: 9 years ago

Ok, we'll take a look at this.

Posts: 111
(@nando4)
Estimable Member
Joined: 8 years ago

@Robert , the avatar uppercase filename bug remains present in 1.4.3. Can you please submit a bug fix request for this?

An admin panel option to disable PNG avatars would also be welcome since PNG files can be large and therefore slow forum responsiveness when using the Online Users, Latest Topics/Replies widgets with avatars enabled.

Page 2 / 3