AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Closed] Round Avatars instead of Oblong?

12 Posts
3 Users
4 Reactions
8,345 Views
Posts: 56
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@glowball)
Trusted Member
Joined: 9 years ago
[#4768]

If people upload an image that is not square, the resulting round avatar is squished and oblong.  What is the best way to make the circle round in all cases?  I see the avatar class in the CSS that came with my theme:

.avatar {
   float: left;
} 

I don't want to add dimensions to this class if I can help it, so it can stay generic.  Thanks for your help!

 


11 Replies
Robert
Posts: 10761
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@robert)
Support Team
Joined: 3 months ago

Please leave some URL to an example.


Posts: 56
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@glowball)
Trusted Member
Joined: 9 years ago

I will need to give an account to you as the forum is behind authentication.  What email address would you like to use?

The issue is a very common one.  If an image is uploaded that is rectangular, you have to do some more manipulation to make it square first before making it a circle.  Otherwise, it's oblong.  I know I'm not the first one to see this, so I thought I'd reach out to your team before messing with it.


Robert
Posts: 10761
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@robert)
Support Team
Joined: 3 months ago

Please leave some screenshot and use avatars with minimum 150px for width and height.


Posts: 56
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@glowball)
Trusted Member
Joined: 9 years ago

Here you are, the user at the top uploaded a rectangular image.  I haven't looked in the /wp-content/uploads/wpforo/avatars directory since people started uploading their own images, but here is something curious.  I have these two images for many users:

username_123.JPG
username_123.jpg

The usernames and IDs are fake here, but I see .JPG images that are larger than .jpg images.  I'm assuming that wpForo is using the .jpg images, and the .JPG images are the original uploads.  For that test user: 

testuser_1234.JPG, 956x763, 177KB
testuser_1234.jpg, 150x150, 6KB

Could this be the issue?  Are you making square images but then when JPG gets changed to jpg the originals are being used instead?  If so, could lowercasing the uploaded file name before processing take care of this issue?

FYI, the forum is calling the JPG images, so it's using the originals (and some of them are pretty big).  I don't think this was what you intended.

oblong

Page 1 / 3
Share: