Upload SVG and WebP images in Magento 2
magestyapps/module-web-images
Enables uploading of SVG and WebP images in Magento 2, including Page Builder, WYSIWYG editor, and product gallery. Supports theme logo/favicon, attribute swatches, and category images.
Build Tests
Code Quality
Tested on Magento 2.4.8-p3
Recent Test History
Each release is tested against the latest Magento version at that time.
Top Contributors
View LeaderboardShare This Module's Status
README
Loaded from GitHubUpload SVG and WebP images in Magento 2
This extension for Magento 2 allows uploading SVG and WebP images in the following sections:
- Page Builder editor
- Wysiwyg editor
- Theme logo and favicon
- Product media gallery
- Attribute option swatch images
- Category image
- Custom image uploader fields
IMPORTANT: if you need to upload any other image format or you need to upload it in any other Magento 2 area - please just drop us a line at alex@magestyapps.com and we will update the extension
IMPORTANT: if you like the extension, could you please add a star to this GitHub repository in the top right corner. This is really important for us. Thanks.
Magento Version Compatibility
| Supported Magento Version | Compatible Module Version | |---------------------------|---------------------------| | 2.4.8 | 1.2.* | | 2.4.7 | 1.2.* | | 2.4.6 | 1.1.* | | 2.4.5 | 1.1.* | | 2.4.4 or older | Not supported |
Installation
Using Composer (recommended)
-
Go to your Magento root folder
-
Download the extension using composer:
For Magento 2.4.7 or newer:
composer require magestyapps/module-web-imagesFor Magento 2.4.5 or 2.4.6:
composer require magestyapps/module-web-images:^1.1 -
Run setup commands:
php bin/magento setup:upgrade; php bin/magento setup:di:compile; php bin/magento setup:static-content:deploy -f;
Manually
-
Go to your Magento root folder:
cd <magento_root> -
Copy extension files to app/code/MagestyApps/WebImages folder:
git clone https://github.com/MagestyApps/module-web-images.git app/code/MagestyApps/WebImagesNOTE: alternatively, you can manually create the folder and copy the extension files there.
-
Run setup commands:
php bin/magento setup:upgrade; php bin/magento setup:di:compile; php bin/magento setup:static-content:deploy -f;
Possible issues
Problem: An image gets uploaded to the server but not accessible in browser.
Solution: Most likely, this is related to your nginx/apache restrictions. Please, make sure that the requested image extension is allowed by the web server configuration.
This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.