Skip to content

Replace cropper with cropperjs

What does this MR do and why?

Migrate from cropper to cropperjs; this resolves the issue described in #299299 (closed) where some uploaded avatars are flipped in the crop dialog.

Screenshots or screen recordings

Uploading an avatar:

regular_upload

Uploading with cropping:

upload_crop_move

Uploading the test image (the one that flips):

upload_flipped

Removing the avatar:

remove_avatar

How to set up and validate locally

With feature flag edit_user_profile_vue disabled: attempt to set user avatar https://gitlab.com/gitlab-org/gitlab/uploads/5d9ec24ff4ec8cf7fe675fba60f6a5f5/Gubaha.jpg and observe that it is right side up, and that the image can be cropped and saved.

Verify the same with feature flag edit_user_profile_vue on:

Feature.enable(:edit_user_profile_vue)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Resolves #299299 (closed)

Edited by Brian Austin

Merge request reports