Project

General

Profile

Actions

Bug #6662

closed

User Cropping fails with very large images

Added by krileon over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
06 June 2017
Due date:
% Done:

100%

Estimated time:

Description

Images with a significant amount of image data (e.g. 4mb 4320x2728) cause the browser image processing to fail. Unsure if error in the JS or limitation of the browser.

https://www.joomlapolis.com/forum/153-professional-member-support/236781-allow-profile-save-only-after-avatar-crop-is-done#294611

Actions #1

Updated by krileon over 7 years ago

The cropping also applies too slowly if the user uploads a large image and clicks submit before the browser has processed it. Implement backup cropping in PHP when using user cropping.

Actions #2

Updated by krileon over 7 years ago

Add a spinner icon next to the input to signify it's processing or something of the sort.

Actions #3

Updated by krileon over 7 years ago

The jQuery validate update caused the validation not to trigger until after the field loses focus. This is where the odd delay comes from.

Edit: Validate on change is still present, but since the input is hidden it's ignored. We need to have a special case for this usage though.

Actions #4

Updated by krileon over 7 years ago

  • % Done changed from 0 to 20

Fixed onchange behavior not working correctly.

Actions #5

Updated by krileon over 7 years ago

The initial cropping is not working. Basically when the image is first output the cropping is applied when the draggable box is established, but when that happens it's outputting an empty canvas resulting in broken initial crop.

Edit: It's due to trying to find the center to initially crop at center as planned. One of the variables calculation fails and returns NaN which breaks the width/height adjustment of the canvas.

Actions #6

Updated by beat over 7 years ago

Regarding the issue with submit before cropping done: Instead of doing it server-side, why not just delay the submit until cropping is done browser-side ?

Actions #7

Updated by krileon over 7 years ago

There is nothing to delay. It's instant. It just wasn't being triggered.

Actions #8

Updated by krileon over 7 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 20 to 100

Fixed in MR !1265

Actions #9

Updated by krileon over 7 years ago

  • Target version changed from CB 2.2 to CB 2.1.3
Actions #10

Updated by krileon over 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF