Hi all,
I`ve been searching through the forum about a way to prevent CKEditor to add a style in total to any image you upload. Responsive Design is becoming a big trend now and for this a fixed width and height for any image is a no go.
Is there a way to prevent CKEditor to add a style to any uploaded image so you get a complete clean upload like:
<img src=''name.jpg" alt="image description" />
For responsive design I use the image tag in CSS:
img{
display: block;
border: 0;
height: 100%;
max-width: 100%;
width: auto\9; /* ie8 */
}
Thanks in advance!!
With kind regards,
Pascal
Hi Passkes, did you have any
Hi Passkes, did you have any answer to this question ?
I have exactly the same problem with responsive images, and ckeditor adding images styles dimensions.
Thanks
ACF might be able to in the
ACF might be able to in the near future, but not right now. At this moment it is only possible to define the allowed "universe". It's not possible to subtract some stuff from the whole universe (so blacklisting is not possible). So one can define that "img[alt,!src,width,height]" is allowed and then styles will be removed, but that means that you have to define the entire allowedContent "universe" from scratch if you want to remove something from the automatic mode.
Side note: The Image plugin is not yet fully compatible with ACF, so it will create width and height styles for images during editing. Those styles are later (on getData()) transformed to attributes if ACF allows only attributes. But good news is that MOST LIKELY we will work on new image plugin. I'm not 100% sure of that, but Reinmar and Fred like the idea.
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Hi Sebastian,
Hi Sebastian,
many thanks for your clear answer.
bye