Skip to Content Skip to Menu

[SOLVED] Client side image resizing and cropping

  • bizguy
  • bizguy
  • OFFLINE
  • Posts: 197
  • Thanks: 32
  • Karma: 5
3 years 10 months ago - 3 years 10 months ago #321776 by bizguy
I have spent hours trying to configure CB to allow user avatar cropping.

Latest: CB
Latest: Joomla
PHP: 7.4ea
Software: GD2, ImageMagick

JQuery enabled

CB Profile Pro is installed but not enabled in profile editing. I have tried disabling the plugin as well, but no success.

wim.devaddrenaline.ca

I configured CB as directed in: www.joomlapolis.com/blog/kyle/18703-client-side-image-resizing

Hope you can help out, as I'm stuck.

Ed
Last edit: 3 years 10 months ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48427
  • Thanks: 8274
  • Karma: 1443
3 years 10 months ago #321777 by krileon
Replied by krileon on topic Client side image resizing and cropping
Edit your image field in CB > Field Management and under Parameters > Image Limits set "Allow Client Resize" to "Enable" and "Maintain Aspect Ratio" to "Yes, with User Cropping". That should be all you need to do. Now upload an image larger than your Maximum Image Height and Maximum Image Width. If the image is already squared it will be resized down and there won't be any need for cropping. The cropping only happens if the image would overflow your maximum limits.


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.
The following user(s) said Thank You: bizguy

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

  • bizguy
  • bizguy
  • OFFLINE
  • Posts: 197
  • Thanks: 32
  • Karma: 5
3 years 10 months ago #321779 by bizguy
Replied by bizguy on topic Client side image resizing and cropping
Thanks again Kyle.

I wasn't seeing the image selection overlay, as my image was 719 x 720 and I had the avatar size set to 200 x 200. I was expecting that I would still get the overlay to position the picture, but CB just kept scaling it. When I changed to a 400 x 720 original, magically everything worked as expected.

Too many hours spent thinking I had a different issue then I did :unsure:

Cheers,

Ed
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum