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

Created on 11 September 2023, over 1 year ago
Updated 14 August 2024, 4 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 2 days 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.71.5 2024