Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter S 169 posts 587 karma points
    Mar 19, 2015 @ 11:20
    Peter S
    0

    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.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 19, 2015 @ 15:33
    Jan Skovgaard
    0

    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

    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.

    Just my 2 cents :)

    /Jan

  • Peter S 169 posts 587 karma points
    Mar 25, 2015 @ 10:37
    Peter S
    0

    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!

Please Sign in or register to post replies

Write your reply to:

Draft