1. dagroupinc
  2. General
  3. Monday, February 03 2020, 07:00 PM
In our user profiles, we have set the default avatar dimensions to 260px wide x 260px high — however we are finding individuals able to upload avatars of varying height and the system not restricted the height of the avatar to the 260px limit set in Avatar/Options Image Field
admin Accepted Answer
Admin
Unfortunately this is not possible natively so you need some custom modification:
- Set to "Normal file input" the parameter "Upload Method", now you will see a simple upload field
- With simple upload field the image will be automatically cropped. To prevent this you need to make some changes to our code, in file /administrator/components/com_jsn/helpers/fields/image.php replace at line 182 (main image) and 192 (thumbs) this code
$foo->image_ratio_crop = true;
with this:
$foo->image_ratio = true;


Now with normal upload the parameter height/width will work as max-height/max-width
  1. more than a month ago
  2. General
  3. # 1
dagroupinc Accepted Answer
Pro
When I inspect the image.php file I find that lines 182 and 192 are already written the way you indicate.
  1. more than a month ago
  2. General
  3. # 2
dagroupinc Accepted Answer
Pro
I take that back — line 192 had _crop in it.
  1. more than a month ago
  2. General
  3. # 3
dagroupinc Accepted Answer
Pro
What I'm struggling with is that with the settings for Options Image Field / Upload Method set to Crop & Webcam (popup) I'm only able to crop an image as a square and not a rectangle. However, I'm finding that other users are able to crop and upload images other than square images.

Could this be a browser issue?
  1. more than a month ago
  2. General
  3. # 4
dagroupinc Accepted Answer
Pro
In Chrome and Firefox I can grab any of the handlebars and am only able to get a square crop. I can move the square around to select an area of an uploaded image.

In Safari an uploaded image is distorted (see attachment)—the width is stretched. I get the same cropping experience as in Chrome, only square no matter which handle I drag.
  1. more than a month ago
  2. General
  3. # 5
admin Accepted Answer
Admin
Hi,
What I'm struggling with is that with the settings for Options Image Field / Upload Method set to Crop & Webcam (popup) I'm only able to crop an image as a square and not a rectangle
This is normal because probably you have set the image size like 260x260 px. The code that I proposed in my previous answer works only with "Normal file input".

However, I'm finding that other users are able to crop and upload images other than square images.
This depend from your configuration, for example you can have different ratio for image and the corresponding thumb. Also if you change the size value then it does not affect already existing images

In Safari an uploaded image is distorted (see attachment)—the width is stretched. I get the same cropping experience as in Chrome, only square no matter which handle I drag.
Probably there is some conflict with template style, probably to fix this you need to add some CSS code...of course we can help you with this but we need to see your registration page, can you please post me the link?
  1. more than a month ago
  2. General
  3. # 6
dagroupinc Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. General
  3. # 7
dagroupinc Accepted Answer
Pro
What I'm saying is with my current configuration I can only crop an image as a square but others seem to be able to crop their images as a square or rectangle. One would think if I have my config set to a square image that it would be restricted to those dimensions—here's my config....
  1. more than a month ago
  2. General
  3. # 8
dagroupinc Accepted Answer
Pro
BTW you previously created a registration
  1. more than a month ago
  2. General
  3. # 9
admin Accepted Answer
Admin
Hi,
sorry but we does not remember the password and unfortunately admins can not request to reset password :(
  1. more than a month ago
  2. General
  3. # 10
dagroupinc Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. General
  3. # 11
admin Accepted Answer
Admin
Hi,
yes you can use the form below the reply in "Site Details" tab. It is private.
  1. more than a month ago
  2. General
  3. # 12
dagroupinc Accepted Answer
Pro
See enclosed
  1. more than a month ago
  2. General
  3. # 13
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.