'How to dynamically resize image in tinyMCE editor?

I am using TinyMCE editor. However, I have run into a problem. I can add the image and resize it as well but when I resize, both height and width get resized by same proportion.

I want to resize only height without affecting the width and vice-versa. The only way I can do this is by hardcoding width and height values which is pretty tedious job. How to fix it?

When I resize both height and width gets resized, no option to resize them separately



Solution 1:[1]

Yes the files contain grayscale images. It is obvious when you look at the actual code.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 anton-tchekov