froala / wysiwyg-rails

Ruby gem for Froala jQuery WYSIWYG HTML Rich Text Editor.
https://froala.com/wysiwyg-editor
MIT License
465 stars 102 forks source link

Image Aspect Ratio isn't correct after inserting image #117

Open stetson-phillips-backstitch opened 1 year ago

stetson-phillips-backstitch commented 1 year ago

Version: 4.0.17

There are a couple issues that we are experiencing when inserting images:

  1. When inserting an image using the Insert Image button the preview of the image looks correct as it is uploading, but once it uploads, the aspect ratio isn't correct.

https://github.com/froala/wysiwyg-rails/assets/97116832/14ed4799-fd4e-4334-89dd-35f4fcedf676

  1. After cropping an image using the Toast UI Image Editor, the same experience occurs.

Current work around is to use the Change Size button and just click Update without changing the size and it will resize correctly, but it isn't an ideal UX.

So far I've only noticed it on images that have a larger width than the editor. I've tried using imageDefaultWidth and setting the width to less than the editor and I wasn't able to change the behavior.