I'm utilising TinyMCEv4 for a solution which has the built in image toolbar plugin.
When a user resizes an image within the WYSWYG editor, the HTML for the image is updated accordingly via the image width/height attributes on the image element:
<img src="img.jpg" alt="Image" width="300" height="200">
If the user were to resize the image by doubling the size of it within the WYSYWG editor of TinyMce, the html would is updated to:
<img src="img.jpg" alt="Image" width="600" height="400">
The problem is - I've got some CSS which prevents the width and height attributes from working. The following CSS is applied to all images sitewide, for responsive purposes:
img {
width: 100%;
height: auto;
}
Is there a way to reverse these CSS rules so that the width/height attributes work for images within a specific class?