Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

How can I stop Tinymce insert height and width attributes to my images?


2 Posts   1058 Views


Community Member, 15 Posts

25 October 2013 at 11:45pm

Hi there,

Currently, when I add image through the TinyMCE image insert function it adds a height and width attribute to the <img> tag. I want to stop that, as it a responsive site and so need the image to be flexible.

Is this possible? Has anyone done it before or know how?

Thanks in advance,


Community Member, 175 Posts

26 October 2013 at 12:31am

Hi Steve,

I've not found any way of preventing that, but I've overcome it before using CSS. Usually, giving img a max-width: 100%; and height: auto; will solve it - browsers seem to ignore the width/height attributes when 'height: auto' is applied.

Hope this helps,