Skip to Content Skip to Menu

2 questions about resizing profile Images

  • pastoweb
  • pastoweb
  • OFFLINE
  • Posts: 163
  • Thanks: 11
  • Karma: 0
7 years 1 month ago - 7 years 1 month ago #298332 by pastoweb
Hi,
1) I set the profile image upload to mantain aspect ratio with cropping, but it seems it just crops the image, while in the profile page the image is oval instead of circle (image resize size is set to 120px for both height and width)
formalms.org/TESTING/index.php?option=com_comprofiler&view=userprofile&user=43&Itemid=292


2)Is there a way to massively regenerate thumbnails? If image dimensions change after they are uploaded, the profile images keep the original thumbnail size...this could be a problem in case of site restyling

thanks for any answer:)
Last edit: 7 years 1 month ago by pastoweb.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48603
  • Thanks: 8300
  • Karma: 1445
7 years 1 month ago - 7 years 1 month ago #298333 by krileon
Replied by krileon on topic 2 questions about resizing profile Images

1) I set the profile image upload to mantain aspect ratio with cropping, but it seems it just crops the image, while in the profile page the image is oval instead of circle (image resize size is set to 120px for both height and width)

Rounded usage is just a CSS style. It's not going to crop the image to an actual circle. If it's oval shaped then the image is not squared. Looks like you tried uploading a portrait style photo with a significantly larger height than width and is why you're having issues. Edit the image field and set "Maintain Aspect Ratio" to "Yes, with User Cropping" and "Allow Client Resize" to "Enable" so you'll have better control over where it crops.

2)Is there a way to massively regenerate thumbnails? If image dimensions change after they are uploaded, the profile images keep the original thumbnail size...this could be a problem in case of site restyling

No, you'd need to use like a batch process in GIMP or Photoshop for that. If CB tried to do this on 99% servers it'd just crash the server as it's too heavy of an operation.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 7 years 1 month ago by krileon.

Please Log in or Create an account to join the conversation.

  • pastoweb
  • pastoweb
  • OFFLINE
  • Posts: 163
  • Thanks: 11
  • Karma: 0
7 years 1 month ago #298335 by pastoweb
Replied by pastoweb on topic 2 questions about resizing profile Images
mmm, can I force users to upload square images?
Otherwise I can't control the width/height ratio of what my users will upload, and the layout would become a mess

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48603
  • Thanks: 8300
  • Karma: 1445
7 years 1 month ago #298346 by krileon
Replied by krileon on topic 2 questions about resizing profile Images

mmm, can I force users to upload square images?

Yes, use user cropping and set maximum width and height to a squared size like 100x100.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • pastoweb
  • pastoweb
  • OFFLINE
  • Posts: 163
  • Thanks: 11
  • Karma: 0
7 years 1 month ago #298353 by pastoweb
Replied by pastoweb on topic 2 questions about resizing profile Images
Thanks, that would be perfect but even setting the same value for w & h, the cropping mask appearing on the image seems to consider just the width limit, not the height (appears as vertical rectangle, not a square)

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48603
  • Thanks: 8300
  • Karma: 1445
7 years 1 month ago #298374 by krileon
Replied by krileon on topic 2 questions about resizing profile Images
I've no such issues in my tests. Using the following ensures a squared image regardless of it being portrait or landscape.

Maximum Image Height: 400
Maximum Image Width: 400
Maximum Thumbnail Height: 200
Maximum Thumbnail Width: 200
Maintain Aspect Ratio: Yes, with User Cropping
Allow Client Resize: Enable

The above ensures a squared 400x400 image. If it's too small it's scaled up. If it's too big it's scaled down. User is then given a crop selection to select where to crop at.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum