-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to disable images from adding aspect ratio and dimensions #16697
Comments
We set the The
If the above suggestions do not help, please provide more information. It would be helpful if you could describe in detail the kind of problems you are encountering, including what results you are currently seeing and what your expected results are. Are the issues due to the |
Thanks, I've spoke to one of the developers on our team and they have a workaround. |
@mmotyczynska Is there a way to keep the width/height attributes and only get rid of the inline This is not really overlook-able. |
@jsfgreen thanks for info, could you share a screen of such audit or mention other tools, I cannot reproduce this is PageSpeed. Inline styles are used by us in many features, due to the nature of the editor's work. |
@Witoso Yes, sorry, I was only using PageSpeed Insights as an example of the type of audit tools. In this case it was SEOptimer. At any rate, it should be a given that these exact types of things matter to people and assumed that somebody, anybody, many people, would want to change them. That and the fact that setting aspect-ratio is superfluous being that the browser calculates that anyway based on the provided width and height attributes. |
As I said, multiple features of the editor use inline styles (tables, alignment, fonts), and due to the nature of the editor we will keep using them.
This was brought up only in the scenario of more complex platforms (CMS) that want to have full ownership of how images are downcasted to HTML. After almost a year after implementation, we haven't received any issues about it until this one AFAIR.
We added it to support the migration from CKEditor 4 to 5, as well as future improvements. In some editors (CKEditor 4 included) it's possible to resize a picture with unlocked aspect-ratio. We added it to support this scenario. More about the changes here. If this doesn't fit your use case, it's always possible to overwrite the pipeline of image downcasting. We have an example of that for images, but I need to search for it. Stay tuned! |
I have a custom plugin which calls the following:
Recently my staff have reported that it adds the following attributes:
This causes problems for me, I was wondering if there was a way of disabling this behaviour or is there an alternative command I should execute?
The text was updated successfully, but these errors were encountered: