You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When saving content that includes an image, CKEditor adds in the width and height parameters. But if I want my image size to be responsive, I need to omit these in order to apply styles with the style sheet.
I note that using the unofficial contrib module CKEditor Addon fixes this problem and others.
One more issue to add to the META? #1087 CKEditor/Rich text editor follow ups.
The text was updated successfully, but these errors were encountered:
jenlampton
changed the title
CKEditor/Rich text editor image sizing needs to be optional.
[UX] CKEditor/Rich text editor image sizing needs to be optional.
Apr 27, 2017
I want my image size to be responsive, I need to omit these in order to apply styles with the style sheet.
Anything you put in your stylesheet will override inline width and height attributes on an image tag. It's only when they are specified as a style attribute that this becomes a problem. Can you verify what the markup is for your rendered HTML on that image?
IIRC style attributes on anything should be removed by the filter system, so I don't think that's likely what's going on here (unless your ckeditor is enabled for the HTML code input format).
From a user-experience perspective, I agree that width & height fields should be optional in the form, I expect most of the time people will prefer to click/drag/resize. However, we also should check if HTML will still be considered valid without width and height attributes on the img tag -- I have a foggy memory of that being a problem.
However, we also should check if HTML will still be considered valid without width and height attributes on the img tag -- I have a foggy memory of that being a problem.
<img> height and width are optional, but having them specified as the actual image size helps the browser render the page quicker, because it doesn't need to load the image to know how large a space it will take up. CSS always wins over the height/width parameters of the image itself.
Maybe the image sizing can be replaced with the option of selecting an Image style predefined in /admin/config/media/image-styles ?
I think such a request is different yet from this issue. I made a new issue at #2658.
When saving content that includes an image, CKEditor adds in the width and height parameters. But if I want my image size to be responsive, I need to omit these in order to apply styles with the style sheet.
I note that using the unofficial contrib module CKEditor Addon fixes this problem and others.
One more issue to add to the META? #1087 CKEditor/Rich text editor follow ups.
The text was updated successfully, but these errors were encountered: