- Affected version
- 2.2.5
When uploading an image that is rotated or has dimensions larger then the allowed maximum, the uploaded files does get resized and/or rotated in
This new image then does get written to the original location of the uploaded file.
Downstream systems like
So the pipeline for JPEG thumbnail generation is basically:
Original Image > Rotate and/or Resize > JPEG Encode > Resize > JPEG Encode
As the image does get resized and encoded to JPEG two times, this doesn't seem ideal.
XF\Http\Upload::transformImage
.This new image then does get written to the original location of the uploaded file.
Downstream systems like
XF\Service\Attachment\Preparer
will then take this file and generate the thumbnail, again by resizing the (now already resized and/or rotated) image and writing out a new file.So the pipeline for JPEG thumbnail generation is basically:
Original Image > Rotate and/or Resize > JPEG Encode > Resize > JPEG Encode
As the image does get resized and encoded to JPEG two times, this doesn't seem ideal.
Last edited: