Skip to content

Upload flipped image to profile avatar

Summary

Profile avatar after upload view flipped upside down.

Steps to reproduce

  1. Go to edit Profile page: https://gitlab.com/-/profile
  2. Upload attached image Gubaha.jpg to profile avatar.
  3. View flipped image on setup and preview. Can't rotate.
  4. Set image. Avatar flipped.

Example Project

https://gitlab.com/CSRedRat

What is the expected correct behavior?

Avatar image not flipped on upload.

Relevant logs and/or screenshots

gitlab_avatar

Output of checks

This bug happens on GitLab.com

Image for upload: https://gitlab.com/gitlab-org/gitlab/uploads/5d9ec24ff4ec8cf7fe675fba60f6a5f5/Gubaha.jpg

Results of GitLab environment info

Windows 10, Google Chrome Version 87.0.4280.141 (Official Build) (64-bit)

Implementation Guide

  1. Open a new MR with the code from Draft: Upgrade cropperjs and remove jQuery depe... (!96912 - closed). Feel free to make any changes to that code if you think there is a better approach for any of it.
  2. Test the following functionality and take screen recordings to show that everything still works correctly.
    • Uploading image without cropping
    • Uploading image with cropping in popup (plus and minus buttons)
    • Uploading flipped image (this bug)
    • Removing uploaded image
  3. Make sure specs are passing. Looks like we do have one in spec/features/file_uploads/user_avatar_spec.rb#L5. If it is possible to improve this spec we should do that too.
Edited by Christina Lohr