MagestyApps / module-web-images

Magento 2 module for uploading images in optimised formats (SVG, WebP, etc.)
https://www.magestyapps.com
102 stars 19 forks source link

SVG / WebP Images Not Uploading To Media Gallery #24

Open stephen-r-k opened 6 months ago

stephen-r-k commented 6 months ago

Magento: 2.4.6-p3 PHP: 8.1.2 Apache: 2.4.52 module-web-images: 1.1.9

Neither SVG or WebP images upload to the Media Gallery.

I get the standard error message, e.g. "Magento.svg: File validation failed."

Elsewhere images upload correctly it's just the Media Gallery.

gz-devops commented 4 months ago

Same problem here!

TommyChausson commented 4 months ago

@MagestyApps , @darkdevelopers hi, it seem's that there is another lock in this Magento File :

https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Backend/view/adminhtml/web/js/media-uploader.js#L45

zakdma commented 3 months ago

@TommyChausson yeah I have to patch this file to make it working again. Looks like the latest Magento changes broke this module.

patelkevin985 commented 1 week ago

patches/media-uploader-allowed-ext.patch Refer to the text file below for the patch content and update the file name accordingly. media-uploader-allowed-ext.txt

Add the following code to the composer.json file located in the root directory of your Magento installation. "extra": { "magento-force": "override", "patches": { "magento/module-backend": { "Change allowed file extensions in media-uploader.js": "patches/media-uploader-allowed-ext.patch" } } }