Skip to Content Skip to Menu

Avatar aspect ratio - user crop from x:y to 1:1

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
2 years 6 months ago #329431 by krileon
Seams to be working same in CB Core Fields Ajax in my tests as it does in profile edit. What ajax Output are you using? For example for Canvas it's best to use Tooltip or Modal. Inline can't really work in the canvas position. Below are screenshots of the canvas cropping. Behavior will be the same regardless of the image field

Profile Edit:


Ajax Modal:


Ajax Tooltip:


Below are the settings used for the canvas image.

Maximum Image Height: 200
Maximum Image Width: 1280
Maximum Thumbnail Height: 100
Maximum Thumbnail Width: 640
Maintain Aspect Ratio: Yes, with User Cropping

Below is the same image with Avatar field cropping.

Profile Edit:


The settings used are as follows.

Maximum Image Height: 160
Maximum Image Width: 160
Maximum Thumbnail Height: 80
Maximum Thumbnail Width: 80
Maintain Aspect Ratio: Yes, with User Cropping

The above gives a 160x160 squared image. It will resize 1 side of the uploaded image down to 160px and providing cropping to remove the rest. We don't have any features to allow you to crop out a 160x160 image from the middle of another image. That's something we plan to provide in the future with an updated image field where the user themselves will be able to crop, resize, and rotate within the limits of the fields parameters.

it's fine if I re-enable it to show in Profile Edit.

What do you mean by this? You're turning off the fields profile edit display? That will break its usage in CB Core Fields Ajax for sure. The field still needs to be profile edit accessible for it to be ajax editable.

Is the cropping tool just not displaying for you? Or is it displaying, but not saving? Do you have a sample image (e.g. take an image that isn't working and just turn the entire image 1 color as it's the dimensions that are important) that you can share with this issue for me to test with that image? Please also provide your settings like I've done above so I can further try and replicate your issue.


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