CKEditor5 automatically adds width and height elements to images in img tags

Created on 18 November 2024, about 1 month ago

Problem/Motivation

When content that has been written and saved with img tags that do not specify width and height attributes is opened in CKEditor5, the width and height attributes are added.

Steps to reproduce

1. Create new content with CKEditor5 editing area.
2. Switch its mode to source mode.
3. Write img tag following:

 <img src="/sites/default/files/sample/2010420100002s.jpg">

4. Switch to WYSIWYG mode.
5. When I change to source mode again, the img tag is rewritten as follows:

<img src="/sites/default/files/sample/2010420100002s.jpg" width="569" height="381">

Proposed resolution

I don't want it to automatically complete width and height.

🐛 Bug report
Status

Active

Version

10.3

Component

ckeditor5.module

Created by

🇯🇵Japan kentaono

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024