Needs work
Project:
Drupal core
Version:
main
Component:
image system
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
27 May 2022 at 14:39 UTC
Updated:
27 Feb 2025 at 21:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
prashant114606 commentedComment #4
cilefen commentedComment #5
wim leersThanks for proposing this! 😄
Alas:
\Drupal\editor\Form\EditorImageDialog::buildForm().So … moving to a different subsystem and retitling to capture your intent.
Comment #6
jshimota01 commentedI didn't search deeply through previously submitted items / issues but found this near the top of the list and wanted to add.
The default installation 'Allowed File Extensions' is legacy from d7. It needs to dynamically add 'webp' support. Since a simple check server side can determine if webp is allowed - the default value should start with webp enabled.
Woe is the poor slob who starts building a website and trys putting a webp logo on -
Comment #7
joshuautley commentedSometimes I wonder what's going on in the Drupal community. Let's get this done. Three lines of code and we are saving so much space on servers worldwide and improving the UX for all site visitors.
And while we're at it, make webM fully supported as well.
Hoops are fun, but shouldn't be necessary.
Comment #8
joshuautley commentedThis video helped us implement a solution with inserting media with image styles (convert to webP) using CKEditor.
https://www.youtube.com/watch?v=JuCbL8g96Iw
Comment #10
jcnventuraThis should make sure that all the currently supported GD image formats and not only webp are supported everywhere. I've referenced as parent the issue where support for all GD supported formats was added to Drupal.
Comment #11
jcnventuraUploading the current state of the MR, so that I can use it from composer-patches without opening the sites to an easy code injection vulnerability.
Comment #12
jcnventuraAnd let's start the testbots while we're doing this, even if it does need a few tests for these changes.
Comment #13
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #14
andypostneeds re-roll for 10.1 or/and MR needs retarget
Comment #15
prem suthar commentedRe-roll the patch For 10.1 version .
Comment #16
Ajeet Tiwari commentedAdded reroll for 10.1.x.
Comment #17
Ajeet Tiwari commentedAdded reroll for 10.1.x.
Comment #18
smustgrave commentedHiding patches #15 (missing tests) and #16 (missing part of fix)
Also not sure if there should be additional tests or not? Will defer to others.
Comment #19
tanuj. commentedadding new patch for drupal 10.1 as earlier patches were incomplete, please review.
Comment #21
tanuj. commentedFixed Tests on #19.
Comment #22
heddnIs there any way to do an audit of existing widget configuration to make sure webp is the default across the board?
Comment #23
duaelfrHey! Thank you for working on this issue!
I learnt a few days ago that AVIF was a serious challenger of WebP. Today, it's supported everywhere but on Edge so it's maybe not the most urgent format to integrate. I thought it might be interesting to do both at the same time or open a follow up issue if you want to wait for Edge support, though.
Comment #24
heddnIf this goes in easily, then we can circle back on avif and do it next. But let's do them a distinct things as we'll have less organizational churn deciding on both at the same time. Make it easy.
Comment #25
smustgrave commentedThis just appears to be changing the default behavior when installed.
There are a number of config files that maybe should be updated as well.
Not sure if any update hook is needed, would assume it could be disruptive to existing sites.
Maybe could be covered by change record.
Comment #26
heddnYup, that's what is going on here. Its a long over due change. The default install should support webp so folks use the more performance file formats.
No update hook should be added or wanted. But a change record is needed to highlight this new default. Tagging appropriately.
Comment #27
smustgrave commentedIn that case think the config should be updated and maybe can go back to review.
Comment #28
mondrake#23 AVIF support is not so straightforward, at least with GD: #3202016: Let GDToolkit support AVIF image format. Imagemagick is a better chance.
Comment #30
andypostIt looks like duplicate of #3275557-9: Add webp image conversion to core's install profile's image style
Comment #31
andypostMost of changes already commited to 10.2 but there's some leftovers #3275557-14: Add webp image conversion to core's install profile's image style
I searched for "jpeg", excluding tests and "webp", and found a few other
places we might want to consider adding webp while we are here:
Comment #32
andypostMoreover Umami can convert the most of the default content images to WebP for smaller size, but better to create separate issue
Comment #33
jiggli commentedI have changed the allowed file extension and added webp. But when i upload a webp, no preview is shown on image upload form, or the display. What could be the possible reason for that ?
Edit - found an issue already in place for it with patch to solve. it
https://www.drupal.org/project/webp/issues/3296075
P.S updating webp module will solve it.
Comment #34
lynxlynxlynx commented`DEFAULT_EXTENSIONS` in `core/modules/file/src/Upload/FileUploadHandler.php` definitely needs extending as well. This is the list of allowed extensioned used when no custom extension validator is used in Form API.
Comment #35
andypostnow AVIF is added, would be great to prefer it when available instead of WEBP
ref #3202016: Let GDToolkit support AVIF image format