Remove auto width and height on images in the editor
Whenever you insert an image in the WYSIWYG editor it sets width and height to them. How can I disable this? And why is this even a feature? It really messes up responsive designs.
Yeah in a responsive area it's not necessarily desired behavior. But in regards to performance it's actually advisable to fill out the height and with attributes in order to make the browser render them faster. And since you don't have much control over images inserted in the rich text editor anyway I think a best practice is to simply just use
img{
max-width:100%
}
So to gain much possible control it's better to see if the content can be constructed in another way not using the RTE.
Remove auto width and height on images in the editor
Whenever you insert an image in the WYSIWYG editor it sets width and height to them. How can I disable this? And why is this even a feature? It really messes up responsive designs.
Hi Peter
Yeah in a responsive area it's not necessarily desired behavior. But in regards to performance it's actually advisable to fill out the height and with attributes in order to make the browser render them faster. And since you don't have much control over images inserted in the rich text editor anyway I think a best practice is to simply just use
So to gain much possible control it's better to see if the content can be constructed in another way not using the RTE.
Just my 2 cents :)
/Jan
Jan,
Excuse my late reply. I'll have to look over another way as max-width won't really do it for us. Thanks, though!
is working on a reply...