TinyMCE Adding Width and Height to Images

Permalink
Currently I have a block that is a content area and when I add an image to that block through the file manager within TinyMCE it automatically adds the width and height of the image. I need to take this off, so the image can be responsive. I know I can go into the html after I put the image in, but that is a hassle and just don't want TinyMCE to put it in there in the first place. Any one know where to fix this?

View Replies:
keeasti replied on at Permalink Reply
keeasti
Have you considered using a CSS override instead?

Like so:

img {
 max-width: 100%;
 height: auto;
}


NB. This would affect all images so you may want to make it more targeted like for example #divName img { ...
rjaskelton replied on at Permalink Reply
That's not going to override the inline styles though. Right now when I add an image it will be <img src="#" width="img_width" height="img_height" alt="some text">. So for some reason the editor is putting the width and height right in it.
keeasti replied on at Permalink Reply
keeasti
Actually I find that it does indeed override the inline HTML width and height declarations. Have you given it a try?
benparker007 replied on at Permalink Reply
Is there any way to stop the automatic width and height added to the image tag?
It adds 600px as width if I added bigger images.