Upload Files modal for Image Increases file size when rotated

Feature(s) impacted

For Forest Admin smart action, File upload modal is not working correctly for jpeg images.

Observed behavior

File Upload modal is used to upload file and rotate image, size of image increased substantially when Image is of jpeg type. PNG image rotate and upload works as expected

ezgif.com-gif-maker (1)

Expected behavior

File upload modal should not increase file size when rotate.

Context

  • Project name: Curator
  • Team name: Developer
  • Environment name: ALL (Staging, Development, Production)
  • Agent type & version:
  • Package Version: 8.3 (forest-express-sequelize)
  • Express Version: 4.17.1
  • Sequelize Version: 6.6.5
  • Database Dialect: MySql
  • Database Version: 5.7.24
1 Like

Hello @Nilesh_Shirsat

I just checked the source code.

It appears that when using the crop/rotate feature, images are converted to PNG quality 100%, regardless of the original file format, which explains the (large) increase of the file size.

I’ll add a bug report to our internal tracking system, and my coworkers will update this thread once the bug is fixed

1 Like

Hello @Nilesh_Shirsat

Thank you for spotting this issue :muscle: .
A fix has just been released to conserve the MIME type while rotating or cropping the image.

You will notice there is still a small increase in size when rotating: it is due to the way we manage and encode the image after the rotation. It shall be reworked in the future :rocket:

2 Likes