• Rich Barton's avatar
    PLT-6659 Fixed upload thumbnails that weren't properly rotated (#6816) · 998b8f70
    Rich Barton authored
    - Used client-side EXIF data to rotate profile picture thumbnails
    - Added a small package for correctly translating EXIF orientation into CSS transforms
    - Instead of displaying the image using FileReader, used URL.createObjectURL because it is faster
    - For upload thumbnails, the original behavior was scaling the entire original image, without accounting for EXIF rotate. I changed this to use the thumbnail image, which does respect rotation.
    - The preview image was not available when the upload request returned, because handling the preview image creation was in a goroutine. I used sync.WaitGroup to block until the preview image creation is done.
    998b8f70
file.go 21.3 KB