[PP-1] Add CKEditor 5 support for WebP images

Created on 11 September 2023, 10 months ago
Updated 3 May 2024, about 2 months ago

Problem/Motivation

In ✨ Allow sites to programmatically opt in to accept more image type uploads in CKEditor 5: TIFF, SVG… Needs work we added hook_ckeditor5_image_controller_extensions_alter() to allow other modules to modify the list of allowed extensions for CKEditor5's image upload plugin.

WebP is officially adopted as an image type by Drupal core, so we need to add CKEditor5 support for it. See #3280279-26: Allow sites to programmatically opt in to accept more image type uploads in CKEditor 5: TIFF, SVG… → for more information.

Proposed resolution

Update \Drupal\ckeditor5\Controller\CKEditor5ImageController::upload() to add webp as a valid file name extension.

Update core/modules/ckeditor5/ckeditor5.ckeditor5.yml -> ckeditor5_imageUpload -> ckeditor5 -> config -> image -> upload -> types to add webp as a valid IANA file type.

Remaining tasks

  1. Commit ✨ Allow sites to programmatically opt in to accept more image type uploads in CKEditor 5: TIFF, SVG… Needs work
  2. Write a patch
  3. Review and feedback
  4. RTBC and feedback
  5. Commit

User interface changes

It is now possible to upload WebP images to CKEditor5 by dragging-and-dropping or using the image upload button.

API changes

None.

Data model changes

None.

Release notes snippet

Added CKEditor5 support for WebP images.

✨ Feature request
Status

Postponed

Version

11.0 🔥

Component
CKEditor 5  →

Last updated about 2 hours ago

Created by

🇨🇦Canada mparker17 UTC-4

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024