Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove EXIF rotation from preview image and remove EXIF dependencies from frontend #326

Merged
merged 1 commit into from
Oct 24, 2021

Conversation

Coteh
Copy link
Owner

@Coteh Coteh commented Oct 24, 2021

Closes #17.

Notes:

  • Modern browsers appear to support EXIF orientation now, which means that rotating the image preview is not required anymore. (images are still rotated server-side, however)
  • Bundle size has been reduced by ~26% (from 169.11 kB to 125.75 kB).
  • Took GitHub Copilot for a test drive while working on this issue - it was able to write out two new image util functions on my behalf (readImage and setImageSrc) and also provided the suggestion to use !!plugin for the plugin filter in webpack.config.js.

Other Changes:

  • Clean up onFileSelected function and split off the code related to upload preview element
  • Remove Sentry webpack plugin when in development mode to speed up rebuild time
  • Slightly increase opacity transition for image preview
  • Change translation value for image preview to be based on percentages, which has slightly moved it down
  • Add util methods for setting image src and reading image data, and remove all other image util frontend functions

…from frontend

Other Changes:
- Clean up onFileSelected function and split off the code related to upload preview element
- Remove Sentry webpack plugin when in development mode to speed up rebuild time
- Slightly increase opacity transition for image preview
- Change translation value for image preview to be based on percentages, which has slightly moved it down
- Add util methods for setting image src and reading image data, and remove all other image util frontend functions
@gitpod-io
Copy link

gitpod-io bot commented Oct 24, 2021

@codecov
Copy link

codecov bot commented Oct 24, 2021

Codecov Report

Merging #326 (8c5611d) into development (86c8887) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           development     #326   +/-   ##
============================================
  Coverage        64.40%   64.40%           
============================================
  Files               15       15           
  Lines             1194     1194           
============================================
  Hits               769      769           
  Misses             425      425           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 86c8887...8c5611d. Read the comment docs.

@Coteh Coteh linked an issue Oct 24, 2021 that may be closed by this pull request
@Coteh Coteh merged commit 88e8d3e into development Oct 24, 2021
@Coteh Coteh deleted the preview-rotate-fix branch October 24, 2021 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve preview image orientation handling
1 participant