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.


  • 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:


Hi @Romain_Coudour,

Thanks for fixing this bug. We are able to test this fix.
However there are some cases when we rotate image, size reduced drastically. This could be significant loss of quality of image when we rotate and save images in ForestAdmin.
ezgif.com-gif-maker (2)

Image used for reference.


Yo @Nilesh_Shirsat,

Thank you for the reply and confirmation on the fix.
Regarding your issue, I manage to reproduce it :muscle:. How weird… computers right?

I opened a new ticket for our team to investigate this. In the meantime, is the feature still usable for your needs in its current state?

Thanks @Romain_Coudour for the response.

Current state of fix is usable and clears the blocker for our work.
Regarding new issues, it is not high priority but it did raise few eyebrows when something weird like this happens.


1 Like