Allow sites to programmatically opt in to accept more image type uploads in CKEditor 5: TIFF, SVG…

Created on 13 May 2022, over 2 years ago
Updated 30 April 2024, 7 months ago

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

  1. Review and feedback
  2. RTBC and maintainer feedback
  3. 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.

Feature request
Status

Fixed

Version

10.3

Component
CKEditor 5 

Last updated about 17 hours ago

Created by

🇮🇳India sandeepraib

Live updates comments and jobs are added and updated live.
  • Security

    It is used for security vulnerabilities which do not need a security advisory. For example, security issues in projects which do not have security advisory coverage, or forward-porting a change already disclosed in a security advisory. See Drupal’s security advisory policy for details. Be careful publicly disclosing security vulnerabilities! Use the “Report a security vulnerability” link in the project page’s sidebar. See how to report a security issue for details.

  • API addition

    Enhances an existing API or introduces a new subsystem. Depending on the size and impact, possibly backportable to earlier major versions.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴

    That's intentional: SVGs are insecure to serve.

    @Wim Leers, that's correct but if we want to use a module such as https://www.drupal.org/project/issues/svg_image , which is sanitizing the file? What's the API that such a module is triggering to allow SVG upload without patching the core?

  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴

    As far as I can see the CKE config can be update to support svg+xml by implementing hook_ckeditor5_plugin_info_alter(), even, for some reasons is not straight because there's no setter for "ckeditor5" definition. But how about CKEditor5ImageController::upload()? Could we, at least, pass the extensions as route options or defaults instead of hardcoding them? BTW, they are now 'gif png jpg jpeg', not even following CKE, which accepts also WebP.

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    BTW, they are now 'gif png jpg jpeg', not even following CKE, which accepts also WebP.

    They're matching what was allowed for CKEditor 4 — see \Drupal\editor\Form\EditorImageDialog::buildForm().

    Could we, at least, pass the extensions as route options or defaults instead of hardcoding them?

    I like that! 😊 That'd make it easy for people Who Know What They're Doing like yourself to allow SVG easily. That's the reason you'd like it to work like this, right? 🤓

  • Status changed to Needs review over 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    32:47
    30:50
    Running
  • 🇨🇦Canada AlexGreen

    Here's a rough draft of how to programmatically allow uploading any type of file to CKEditor5. If the svg_image module implemented this, it would solve @Claudiu.cristea's issue, but also add support for ".webp", ".avif", etc..., as suggested by @wim-leers. The issue title probably needs to be changed now?
    This doesn't have any tests yet, I'm just looking for feedback on the general idea.
    I did not base this on the previous patch, so I'm not including an interdiff, but if you would like, I can include one :). Feedback welcome.

  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States smustgrave

    Can the issue summary be updated with the proposed solution please. Easier for reviews when the default template is used.

    Thanks!

  • Status changed to Needs review over 1 year ago
  • 🇨🇦Canada AlexGreen

    Updated issue summary

  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States smustgrave

    Applied the patch #11 but don't appear able to upload an image via image upload button in ckeditor.

    Also noticed test coverage was missing we will need some

    Thanks.

  • 🇨🇦Canada AlexGreen

    @smustgrave will add test coverage soon, you'll need some code like this to upload new file types and to be running CKEditor 5:

    function my_module_ckeditor5_image_controller_extensions_alter(array &$extensions): void {
      $extensions[] = 'svg';
    }
    
    function my_module_ckeditor5_plugin_info_alter(array &$plugin_definitions): void {
      // Add a custom file type to the image upload plugin. Note that 'svg+xml' below
      // should be an IANA media type Name.
      // https://www.iana.org/assignments/media-types/media-types.xhtml#image 
        $imageUploadPlugin = $plugin_definitions['ckeditor5_imageUpload']->toArray();
        $imageUploadPlugin['ckeditor5']['config']['image']['upload']['types'][] = 'svg+xml';
        $plugin_definitions['ckeditor5_imageUpload'] = new \Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition($imageUploadPlugin);
    }
    

    See also comments #8, #9 and #10 for why this custom code is necessary

  • 🇧🇷Brazil bruno.bicudo Bragança Paulista - São Paulo

    I applied #11 and testes with the suggested snippet (from @AleexGreen on #15). Notice i created a custom module named svg-test with the snippet, and also tested on a new clean Drupal 10 installation.

    Patch applied with no issues and solution works great! Only tests left to make it RTBC i guess.

    Evidence attached.

    Thanks.

  • Status changed to Needs review over 1 year ago
  • last update over 1 year ago
    Patch Failed to Apply
  • 🇨🇦Canada AlexGreen

    Let's see if Test Bot likes this test.

  • last update over 1 year ago
    Custom Commands Failed
  • 🇨🇦Canada AlexGreen

    Sorry, bad patch. Let's see if this one works.

  • last update over 1 year ago
    29,485 pass
  • 🇨🇦Canada AlexGreen

    Fixed some lints, now ready for review. Feedback welcome!

  • Status changed to Needs work about 1 year ago
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
    1. +++ b/core/modules/ckeditor5/ckeditor5.api.php
      @@ -272,6 +281,16 @@ function hook_ckeditor4to5upgrade_plugin_info_alter(array &$plugin_definitions):
      + * Modify the list of allowed extensions for the image upload plugin.
      

      s/Modify/Modifies/

    2. +++ b/core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php
      @@ -144,8 +156,12 @@ class CKEditor5ImageController extends ControllerBase {
      +    $extensions = ['gif', 'png', 'jpg', 'jpeg'];
      +    $this->moduleHandler
      +      ->alter('ckeditor5_image_controller_extensions', $extensions);
      +
      

      🤔 This is only modifying the Drupal-side validation logic.

      Shouldn't we also update

      ckeditor5_imageUpload:
        ckeditor5:
          plugins:
            - image.ImageUpload
            - drupalImage.DrupalImageUpload
          config:
            image:
              upload:
                types: ["jpeg", "png", "gif"]
      

      ?

      See https://ckeditor.com/docs/ckeditor5/latest/api/module_image_imageconfig-....

  • Status changed to Needs review about 1 year ago
  • last update about 1 year ago
    29,490 pass
  • 🇨🇦Canada AlexGreen

    Here is a patch for problem #1.
    @wim-leers for problem #2, we adjust ckeditor5_imageUpload.ckeditor5.config.image.upload.types in ckeditor5_test_module_allowed_image_ckeditor5_plugin_info_alter() i.e.: hook_ckeditor5_plugin_info_alter()

  • Status changed to RTBC about 1 year ago
  • 🇺🇸United States smustgrave

    CR reads well I think

  • last update about 1 year ago
    29,491 pass
  • Status changed to Needs review about 1 year ago
  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴
    +    $extensions = ['gif', 'png', 'jpg', 'jpeg'];
    +    $this->moduleHandler
    +      ->alter('ckeditor5_image_controller_extensions', $extensions);
    +
         $validators = [
    -      'file_validate_extensions' => ['gif png jpg jpeg'],
    +      'file_validate_extensions' => [implode(' ', $extensions)],
           'file_validate_size' => [$max_filesize],
           'file_validate_image_resolution' => [$max_dimensions],
    

    I think .webp should be officially supported, so it should be in the $extensions list? Setting to NR to weight on that

  • 🇺🇸United States smustgrave

    Personally I would say follow up. Think expanding the allowed list could be larger conversation vs around this new hook.

  • Status changed to Needs work about 1 year ago
  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴

    OK, agree. Just keep in mind that WebP is officially adopted as image type by Drupal core, so we need to add the followup only for .webp. A future expansion of accepted types is out of scope for the followup.

    Setting to NR to have the followup created and linked here.

  • Status changed to Needs review about 1 year ago
  • 🇨🇦Canada mparker17 UTC-4

    Follow-up issue added: 📌 [PP-1] Add CKEditor5 support for WebP images Postponed

  • Status changed to RTBC about 1 year ago
  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴

    Thank you

  • last update about 1 year ago
    29,493 pass
  • last update about 1 year ago
    29,493 pass
  • last update about 1 year ago
    29,497 pass
  • last update about 1 year ago
    29,497 pass
  • Status changed to Needs work about 1 year ago
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    #21.2: Right, ckeditor5_test_module_allowed_image_ckeditor5_plugin_info_alter() only modifies the plugin definition. And ckeditor5_test_module_allowed_image_ckeditor5_image_controller_extensions_alter() modifies only the Drupal file upload validation logic.

    My bad!

    But what's missing here is explicit docs in:

    1. the ckeditor5_imageUpload plugin definition that points out this connection (which was not necessary before because it was all hard-coded)
    2. the change record
    3. last but not least: ckeditor5.api.php, since this issue is increasing the API surface!

    It's critical that these two are in sync. And it's also critical to describe why in one place you need svg and in the other svg+xml.

  • Status changed to Needs review about 1 year ago
  • last update about 1 year ago
    29,502 pass
  • 🇨🇦Canada AlexGreen

    I've made the documentation clear in both cases (filename extension vs image media type name) and the change record. Feedback is welcome :).

  • Status changed to Needs work about 1 year ago
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    I'm sorry to be so annoying, but I still think the connection isn't quite clear enough 😅

    1. +++ b/modules/ckeditor5/ckeditor5.api.php
      @@ -255,8 +255,9 @@ function hook_ckeditor5_plugin_info_alter(array &$plugin_definitions): void {
         // Add a custom file type to the image upload plugin. Note that 'tiff' below
      -  // should be an IANA media type Name.
      -  // https://www.iana.org/assignments/media-types/media-types.xhtml#image
      +  // should be an IANA image media type Name.
      +  // @see https://www.iana.org/assignments/media-types/media-types.xhtml#image
      +  // @see https://ckeditor.com/docs/ckeditor5/latest/api/module_image_imageconfig-ImageUploadConfig.html#member-types
         assert($plugin_definitions['ckeditor5_imageUpload'] instanceof CKEditor5PluginDefinition);
         $imageUploadPlugin = $plugin_definitions['ckeditor5_imageUpload']->toArray();
         $imageUploadPlugin['ckeditor5']['config']['image']['upload']['types'][] = 'tiff';
      

      This should have:

      // @see hook_ckeditor5_image_controller_extensions_alter()
      
    2. +++ b/modules/ckeditor5/ckeditor5.api.php
      @@ -288,6 +289,9 @@ function hook_ckeditor4to5upgrade_plugin_info_alter(array &$plugin_definitions):
      +  // The following array values should be the file name extensions to be
      +  // validated by the image upload controller.
      +  // @see https://www.drupal.org/node/3363700
      

      This should have:

      // @see hook_ckeditor5_plugin_info_alter
      
    3. +++ b/core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php
      @@ -144,8 +156,12 @@ class CKEditor5ImageController extends ControllerBase {
      +    $extensions = ['gif', 'png', 'jpg', 'jpeg'];
      +    $this->moduleHandler
      +      ->alter('ckeditor5_image_controller_extensions', $extensions);
      

      Can we move this logic into a protected function getAllowedExtensions() helper method? Then that provides us a point to point towards.

      Also, can we add an @see ckeditor5_imageUpload in ckeditor5.ckeditor5.yml just above the $extensions variable declaration, to make the connection clear?

    4. +++ b/modules/ckeditor5/ckeditor5.ckeditor5.yml
      @@ -532,6 +532,8 @@ ckeditor5_imageUpload:
      +          # https://www.iana.org/assignments/media-types/media-types.xhtml#image
      
      • Nit: missing leading @see 😅
      • Thanks to the previous point, we can now do @see \Drupal\ckeditor5\Controller\CKEditor5ImageController::getAllowedExtensions() 😊
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    As I wrote #31, I was thinking:

    Then we wouldn't need hook_ckeditor5_image_controller_extensions_alter() (aka the API addition!) at all. Which is much better: less API surface, and no need to manually keep the two in sync, so it also removes the need for documenting that tricky aspect, which is what I've been worried about in #29 and #31!

    And … sure enough, core has the necessary infra. AFAICT this pseudocode should work:

    $mimetypes = new \Symfony\Component\Mime\MimeTypes();
    $imageUploadPlugin = $plugin_definitions['ckeditor5_imageUpload']->toArray();
    $extensions = [];
    foreach ($imageUploadPlugin['ckeditor5']['config']['image']['upload']['types'] as $mime_type) {
      $extension = $mimetypes->getExtensions($mime_type);
    }
    

    That'd make this issue trivial to land 😊

  • last update about 1 year ago
    Custom Commands Failed
  • @aleexgreen opened merge request.
  • last update about 1 year ago
    Custom Commands Failed
  • 42:16
    40:02
    Running
  • 12:52
    10:05
    Running
  • last update about 1 year ago
    29,673 pass
  • Status changed to Needs review about 1 year ago
  • 🇨🇦Canada AlexGreen

    @wim-leers, after some manual testing, I figured out that symfony/mime expects to be passed the fully-qualified mime type with subtype and type ( i.e. the Template (second) column in this table) in order to look up the file extensions.
    However, CKEditor5 expects to be passed the IANA image type name (i.e. the Name (first) column in the table)

    Internally, CKEditor5 adds/removes the 'image/' string to the beginning of the IANA image type to convert between fully-qualified mime types and image types, but as far as I can tell this assumption isn't guaranteed by the IANA, so it may be risky for us to use it too. I'm unsure on how else to achieve this without patching CKEditor5 (i.e. so it always handles fully-qualified mime types) or symfony/mime (i.e. to make it aware of how IANA image type names map to fully-qualified mime types) .

  • last update about 1 year ago
    Custom Commands Failed
  • Pipeline finished with Failed
    about 1 year ago
    #29428
  • last update about 1 year ago
    Custom Commands Failed
  • Pipeline finished with Failed
    about 1 year ago
    #29451
  • last update about 1 year ago
    29,657 pass
  • Status changed to RTBC about 1 year ago
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Thanks for your very thorough work here, @AleexGreen — it does not go unnoticed and is deeply appreciated! 🤩 👏

    Given the very long list in the table you link, I do think that's a safe assumption to make. Especially because in December 2020, some new top-level types were added.

    Any image file type that does not use the image top-level type will not work correctly in many applications.

    All I had to do here was fix nits and copy/paste bits and pieces from \Drupal\Tests\ckeditor5\FunctionalJavascript\ImageTest::addImage() to make the test coverage actually do what it claims 👍

    P.S.: looking forward to having our paths cross again here in the d.o issue queue! 😊

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Updated issue summary 👍

  • Status changed to Needs work about 1 year ago
  • 🇬🇧United Kingdom longwave UK

    Added a little bit of feedback but overall this looks good to me.

  • Pipeline finished with Success
    about 1 year ago
    #29453
  • Pipeline finished with Failed
    about 1 year ago
    #41746
  • Pipeline finished with Failed
    about 1 year ago
    #41749
  • Status changed to Needs review about 1 year ago
  • 🇨🇦Canada AlexGreen

    I think this is ready for re-review

  • Pipeline finished with Failed
    about 1 year ago
    #41758
  • Pipeline finished with Success
    about 1 year ago
    #41764
  • Status changed to RTBC about 1 year ago
  • 🇺🇸United States smustgrave

    Seems all open threads have been addressed and already received reviews from @longwave and @Wim Leers

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Posted one last nit, but it's really something that is already in HEAD.

    This MR looks great — thanks @AleexGreen!

  • Pipeline finished with Success
    about 1 year ago
    #45216
  • 🇨🇦Canada AlexGreen

    Last thread resolved, thanks @wim-leers!

  • Pipeline finished with Success
    about 1 year ago
    #45240
  • Status changed to Needs work about 1 year ago
  • 🇬🇧United Kingdom longwave UK

    This looks great!

    However the MR needs rebasing against 11.x following 📌 Move file upload validation from file.module to constraint validators Fixed which also changed CKEditor5ImageController.

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    EDIT: cross-posted with @longwave and … shoot, he's right, even though @AleexGreen rebased on latest upstream. Root cause: this MR was created before the 11.x branch existed 😬

    @longwave Could you please change the target branch to 11.x? Only committers can do that unfortunately 🫣

  • 🇬🇧United Kingdom longwave UK

    Might also be worth waiting for 📌 Make CKEditor5ImageController reuse FileUploadHandler Active ?

  • 🇬🇧United Kingdom longwave UK

    Didn't realise that the linked issue above only went into 11.x (10.3.x) and so I'm not sure how to get this into 10.2.x without having to untangle it again in 10.3.x given both want to change the constructor :/

    Maybe this just has to be 11.x/10.3.x only as well?

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    @longwave I think this issue/feature request is hard-blocking some sites (i.e. those sites that absolutely need SVG or webp images).

    On the other hand, 📌 Move file upload validation from file.module to constraint validators Fixed and 📌 Make CKEditor5ImageController reuse FileUploadHandler Active are "only" changing implementation details: zero end user impact.

    Conclusion: this issue should land in both 10.2.x (in its current MR form) and 11.x (in a rebased form).

    Do you agree? If you do, then @AleexGreen can just open a second merge request that targets 11.x!

    (@AleexGreen: the policy is that everything must first land in 11.x before it lands in 10.x.y — otherwise we risk making the future major less capable than the current major 😅)

  • 🇬🇧United Kingdom longwave UK

    Given 📌 Make CKEditor5ImageController reuse FileUploadHandler Active is a standard refactoring task with no deadline and this is a major feature request blocking other sites, and they both want to touch the same controller, I think we should postpone that one on this, and try to get this in to 10.2.0 before next week's beta deadline.

  • Merge request !5295Resolve #3280279 for 11.x → (Open) created by wim leers
  • Status changed to RTBC about 1 year ago
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    💯

    I opened a new MR for 11.x since the current MR would need to go in as-is into 10.2.x anywya.

    Since this is just applying the existing MR + resolving conflicts, I squashed all of the existing commits to a single one, applied that as a commit, and resolved the conflicts. (No point in resolving the same conflict in many subtly different ways dozens of times.)

  • Pipeline finished with Failed
    about 1 year ago
    #46108
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    @longwave Could you please change the target branch of the original MR back to 10.2.x? 🙏

  • 🇬🇧United Kingdom longwave UK

    #50 Done, but that still needs rebasing.

  • Pipeline finished with Failed
    about 1 year ago
    #46129
  • 🇬🇧United Kingdom longwave UK

    In fact the 11.x MR applies cleanly to 10.2.x (as it should), so we don't need the older MR any more.

  • Status changed to Needs work about 1 year ago
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    I'm confused, the 11.x MR must necessarily be different compared to 10.2.x because 📌 Move file upload validation from file.module to constraint validators Fixed only exists in 11.x? 🤔

    AHHHHHHHHHHH! 🤣 Now I get it! #3221793 landed in 11.x at a time when 10.2.x did not exist yet! That explains all the confusion 😅

    Back to so that @AleexGreen can address @longwave's review on the MR — one new thing has come up due to the rebase 😅

  • Status changed to Needs review 12 months ago
  • 🇨🇦Canada AlexGreen

    I can confirm that the code in the branch named 3280279-11 applies to both 11.x (at b20ec5185c) and 10.2.x (at ffd4be4dda)

    @longwave I think I understand what you were asking me to do, but I'm still pretty new to this and don't fully understand all the terminology yet.

  • Pipeline finished with Failed
    12 months ago
    #55953
  • Status changed to Needs work 12 months ago
  • 🇨🇦Canada mparker17 UTC-4

    mparker17 changed the visibility of the branch 3280279-add-api-to to hidden.

  • Pipeline finished with Canceled
    12 months ago
    #59183
  • Pipeline finished with Failed
    12 months ago
    #59184
  • Pipeline finished with Success
    12 months ago
    #59190
  • Status changed to Needs review 12 months ago
  • 🇨🇦Canada AlexGreen

    Fixed broken tests and added the deprecation warning, ready for re-review :).

  • Status changed to RTBC 12 months ago
  • 🇺🇸United States smustgrave

    Believe all feedback has been addressed. Not sure about 10.2 though if the tag for releases notes should be removed.

  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    Per https://www.drupal.org/about/core/policies/core-release-cycles/schedule , the final release happens next week. https://www.drupal.org/project/drupal/releases/10.2.0-rc1 was tagged Dec 1. The 10.2 train has left the station, so this will board the next one 😊

    Updated issue tag + CR.

  • Pipeline finished with Success
    11 months ago
    #59695
  • 🇮🇳India pks_gpj New Delhi

    Hi
    I just used the below code & patch and this works for me. You need to turn off /on the insert image icon in CK Editor config.

    /**
    function fam_common_ckeditor5_image_controller_extensions_alter(array &$extensions): void {
      $extensions[] = 'svg';
    }
    
    function fam_common_ckeditor5_plugin_info_alter(array &$plugin_definitions): void {
      // Add a custom file type to the image upload plugin. Note that 'svg+xml' below
      // should be an IANA media type Name.
      // https://www.iana.org/assignments/media-types/media-types.xhtml#image 
        $imageUploadPlugin = $plugin_definitions['ckeditor5_imageUpload']->toArray();
        $imageUploadPlugin['ckeditor5']['config']['image']['upload']['types'][] = 'svg+xml';
        $plugin_definitions['ckeditor5_imageUpload'] = new \Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition($imageUploadPlugin);
    }

    Patch code

    diff --git a/web/core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php b/web/core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php
    index 47f8e1e3d..577dbeecb 100644
    --- a/web/core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php
    +++ b/web/core/modules/ckeditor5/src/Controller/CKEditor5ImageController.php
    @@ -145,7 +145,7 @@ public function upload(Request $request) {
         }
     
         $validators = [
    -      'file_validate_extensions' => ['gif png jpg jpeg'],
    +      'file_validate_extensions' => ['gif png jpg jpeg svg'],
           'file_validate_size' => [$max_filesize],
           'file_validate_image_resolution' => [$max_dimensions],
         ];
    
  • Status changed to Needs work 11 months ago
  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    Updated issue credits.

    Changed the change record to remove references to SVG because we shouldn't be recommending that, used webp instead.

    Went to commit it, but it's failing phpcs as follows.

    FILE: ...5/tests/src/FunctionalJavascript/CKEditor5UploadModuleAllowedImageTest.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     1 | ERROR | [x] Missing declare(strict_types=1).
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    Time: 55ms; Memory: 10MB
  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    📌 Make CKEditor5ImageController reuse FileUploadHandler Active is in too, so this needs a reroll

    We should also remove the last hunk (Additional changes) from the change record and update https://www.drupal.org/node/3388990 instead

  • Pipeline finished with Canceled
    10 months ago
    #77802
  • Pipeline finished with Failed
    10 months ago
    #77803
  • Pipeline finished with Failed
    10 months ago
    #81092
  • Pipeline finished with Success
    10 months ago
    #81099
  • Status changed to Needs review 10 months ago
  • Status changed to Needs work 10 months ago
  • 🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

    Just a couple of nits.

  • 🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

    kim.pepper changed the visibility of the branch 11.x to hidden.

  • 🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

    kim.pepper changed the visibility of the branch 3280279-11 to hidden.

  • 🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

    kim.pepper changed the visibility of the branch 3280279-11 to active.

  • Pipeline finished with Canceled
    10 months ago
    #84460
  • Status changed to Needs review 10 months ago
  • 🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

    Rebased on 11.x and resolved my own feedback. :-D

  • Pipeline finished with Success
    10 months ago
    Total: 498s
    #84461
  • 🇺🇸United States smustgrave

    Believe @larowlan did the change record updates he mentioned #62 can you confirm? I was looking at the history of the CR.

    Changes here to the MR look good and all threads addressed. So +1 RTBC from me but per new approach for Needs Review queue going to leave in review for additional eyes.

  • Status changed to RTBC 9 months ago
  • 🇺🇸United States smustgrave

    Confirmed with @larowlan on slack he did make the updates.

  • 🇳🇿New Zealand quietone

    I'm triaging RTBC issues . I read the IS, the comments, the CR and the MR. I didn't find any unanswered questions.

    Everything about this issue was easy to review. Thank you to everyone for the easy to follow comment in the issue and in the MR. The CR reads well too. :-)

    I pushed a small change to the description of the test module and left a question. The question does not block this so I will leave at RTBC. I will also make a comment in #needs-review-queue-initiative about the change to the module description field.

    Leaving at RTBC.

  • Pipeline finished with Failed
    9 months ago
    Total: 596s
    #104552
  • Pipeline finished with Success
    9 months ago
    #104562
  • Status changed to Needs work 8 months ago
  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    Just one minor nit on the deprecation message, very close

  • 🇮🇳India pradhumanjainOSL

    pradhumanjain2311 made their first commit to this issue’s fork.

  • Pipeline finished with Success
    8 months ago
    Total: 498s
    #115914
  • Hey guys, just uploading a static patch from the MR #5295 for D10.2.x.

  • Status changed to RTBC 7 months ago
  • 🇨🇦Canada mparker17 UTC-4

    The nit was fixed, back to RTBC

  • 🇬🇧United Kingdom alexpott 🇪🇺🌍

    @victordcp please don't change the issue version for a backport patch.

  • Status changed to Fixed 7 months ago
  • 🇬🇧United Kingdom alexpott 🇪🇺🌍

    Committed and pushed 24c7a867089 to 11.x and 9f3ec358da6 to 10.3.x. Thanks!

    • alexpott committed e1e8d87d on 10.3.x
      Issue #3280279 by AleexGreen, Wim Leers, sandeepraib, kim.pepper,...
    • alexpott committed 8f95f51a on 11.x
      Issue #3280279 by AleexGreen, Wim Leers, sandeepraib, kim.pepper,...
  • 🇧🇪Belgium BramDriesen Belgium 🇧🇪

    Published the CR.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024