Locked Solved Bug reports

Unable to upload .webp format

Locked by Fred · 25 Dec 2025 13:20 • Solved by Fred · 25 Dec 2025 13:20
Avatar
Posts 6

Hello, hopefully I'll be able to report the bug better today. I searched for the topic "webp" and didn't find any mention of it here on the forum.
I can't upload a webp format file. The file type is allowed in the administration.
But maybe I just overlooked something somewhere. I'm just a user.

In any case, I wish you happy holidays, if you celebrate them in your country. P.


  • webp
Avatar
Posts 67

patrikcmejla

You can, but Fred only put on custom file (Forgetting the .webp). Which it's suppose to be accept="image/*" which for Mac, I don't think there is a bypass around that. Apart from Windows and Linux there is.

You too also have a happy holidays.

Edited on Dec 24, 2025 By Gavin .

Avatar
Best answer set by Fred 1 month ago
Posts 243

EasyMDE Plugin Update: WebP Image Support

I modified the easyMDE plugin to allow WebP image uploads if file permissions permit.

Changes in plugins/easymde/EasyMDEPlugin.php

  1. Retrieving allowed types from configuration: The plugin reads uploads.images to get the allowed extensions (including webp).

  2. Converting to MIME types: Uses UploadService::extensionsToMimeTypes() to convert extensions to MIME types.

  3. Adding the imageAccept option: Adds imageAccept to the easyMDE configuration with the allowed MIME types, enabling easyMDE to filter files client-side according to permissions.

How It Works

  • If webp is in uploads.images['allowed_types'], easyMDE will accept WebP files.
  • The backend (UploadController::uploadImage()) already supports WebP.
  • The UploadService already handles validation and MIME type conversion for WebP.

Result

The easyMDE plugin now accepts WebP images in posts if file permissions allow it. Users can select and upload WebP files from the markdown editor.

The code is ready to use. You can test it by uploading a WebP image from the easyMDE editor in a post.

Avatar
Posts 67

Cool

Avatar
Posts 6

It works! Thank you!

  • Like(1)
    FredFred

This discussion is locked

Log in to reply
navigation.title
5Posts
post #1
24 Dec 2025
ByUtilisateur