Score:0

How to upload .webp to Image field?

us flag

https://www.drupal.org/project/imagewebp lets you upload a regular jpg/png which converts it into webp, but how to upload already a file that is in webp?

Adding it as one of allowed extensions in the field setting does not work.

update As an alternative this can be solved with https://www.drupal.org/project/file_entity, but this is for the file field and not image field.

The question is about image field. Because in production site that already has image field in use with many images and pages active, it needs .webp extension support added to already existing image field.

id flag
Upgrade to Drupal 9.5 or 10. [WebP is supported](https://www.drupal.org/node/3171135) there.
user3108268 avatar
us flag
I'm afraid this is not a right answer. Question is about Drupal 7 which is still officially maintained at least until Nov 1st 2023. Upgrading to solve all problems is not an answer, especially spending weeks or months upgrading entire platform just to have one file extension support. Thank you.
id flag
Support the efforts to complete https://www.drupal.org/project/drupal/issues/3179554 if you are unable to update to Drupal 9 or 10.
user3108268 avatar
us flag
@cilefen the patch in the link works, can you please post this as the answer to solve and close the question?
Kevin avatar
in flag
`officially maintained at least until Nov 1st 2023` yes but doesn't mean it gets new features. Your best bet is to upgrade or try the patche(s) in the link cilefen added.
leymannx avatar
ne flag
I’m voting to close this question because it's a known issue on drupal.org and a workaround has been identified already in the question.
Score:2
id flag

Drupal Core 7 does not yet support WebP but there are reportedly working patches on this in-progress issue: https://www.drupal.org/project/drupal/issues/3179554.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.