Issue: Uploading .webp images without checking “Use Original Image Name” causes the file to be saved without an extension (e.g., myimage instead of myimage.webp). This breaks browser rendering, triggers ModSecurity blocks, and leads to missing or incorrect Content-Type.
File affected: admin/plugins/jQuery-File-Upload/php/UploadHandler.php
Steps to Reproduce:
Upload a .webp image
Uncheck “Use Original Image Name”
File is saved without .webp extension
Image fails to load or gets blocked
Root Cause:
.webp is missing from MIME regex
get_file_type() doesn’t recognize .webp
exif_imagetype() switch lacks IMAGETYPE_WEBP
Suggested Fix:
Add webp to MIME regex: /(gif|jpe?g|png|webp)/
Add case IMAGETYPE_WEBP to image type detection
Update get_file_type() to return 'image/webp' for .webp