Problem/Motivation
Currently, Drupal 9.3.13 CKEditor 5 does not support SVG Images to upload. SVGs are insecure to serve but the SVG image module sanitizes SVG files. Since the SVG image module sanitizes the file, it will need a way to communicate with the CKEditor5 image uploader, that it is safe to upload the file. Also CKEditor5 supports ".webp" files, but there is currently no way to mark them as uploadable, other than changing magic strings in core.
Proposed resolution
Demonstrate how to alter CKEditor5 plugin info to add custom file type to the image Upload plugin.
Add an alter hook to modify the list of allowed extensions for the image upload plugin.
Update the CKEditor5ImageController to call that alter hook.
MR to use
MR 5295 = 11.x
Remaining tasks
Write a patchUpdate issue summary- Review and feedback
- RTBC and maintainer feedback
- Commit
User interface changes
None but implementing the API will allow uploading and dragging and dropping of new types of images.
API changes
None.
Data model changes
None.
Release notes snippet
It's now possible to alter the ckeditor5_imageUpload
plugin definition to allow uploads of additional file types, such as TIFF or SVG.
Original report by sandeepraib
Currently, Drupal 9.3.13 ckeditor 5 does not support SVG Images to upload.