- Issue created by @lauriii
- Status changed to Postponed
almost 2 years ago 12:45pm 26 January 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
AFAICT that'd be an upstream bug in
ckeditor5-image
'sImageResize
plugin?https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-ima... indeed seems to have zero handling for
height
…Yep, https://github.com/ckeditor/ckeditor5/issues/5154 specifically covers this.
- Status changed to Needs review
almost 2 years ago 3:29pm 26 January 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
This is actually caused by
\Drupal\editor\Plugin\Filter\EditorFileReference::process()
. It blindly computesheight
andwidth
if either one is not set, by inspecting the referenced file. But … it does not take into account that a%
value could be set on either one.Even though that is technically not valid in HTML 5 (see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Img#attr-width), it was historically allowed so we should cater for that too (https://en.wikipedia.org/wiki/Robustness_principle).
This bug was introduced in 📌 Leverage the 'loading' html attribute to enable lazy-load by default for images in Drupal core Fixed .
The last submitted patch, 4: 3336446-4-test-only-FAIL.patch, failed testing. View results →
- Assigned to frega
- Status changed to Needs work
almost 2 years ago 12:42pm 28 January 2023 - @frega opened merge request.
- 🇩🇪Germany frega
Rerolled as MR.
Adjusted `3336446-4-test-only-FAIL.patch` to reflect removal of `loading="lazy"` attributes in this filter (@see https://git.drupalcode.org/project/drupal/-/commit/a266ba6e).
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 3:22pm 28 January 2023 The last submitted patch, 8: 3336446-7-test-only-FAIL-rerolled.patch, failed testing. View results →
- 🇩🇪Germany frega
Setting back to needs review, as the last patch should _fail_ (rerolled test-only patch).
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Thanks @frega! (Also: long time no see! Hope you're well! 😊)
- Status changed to Needs work
almost 2 years ago 10:41pm 11 February 2023 - 🇺🇸United States smustgrave
This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request → as a guide.
Think looks interesting. Could the issue summary be updated with proposed solution and steps to reproduce please. Also this will keep failing as the test only patch was the last uploaded. Actually surprised to see it survived the review bot.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
While we should definitely do this hardening, I think 🐛 CKEditor 5 resizes images with % width instead of px width (the CKEditor 4 default): breaks image captions *and* is a regression Fixed would actually solve this even better? All followers of this issue should review that!
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
🐛 CKEditor 5 resizes images with % width instead of px width (the CKEditor 4 default): breaks image captions *and* is a regression Fixed landed. Upon re-editing content with CKEditor 5 and re-saving it, CKEditor 5 will convert the % width to pixels instead.
That makes this a fix for a fairly obscure problem. Except that all resized images created with CKEditor 5 so far on all Drupal >=9.5 sites would definitely benefit from this.
So keeping the same priority.