JPG and PNG image uploads are by default supported by Magento 2. However, it does not allow users to upload SVG, PDF, or HTML files.
However, a store owner frequently has to upload vector images both in the frontend and the backend. A custom module can be used to upload an SVG file.
The store owner might desire to upload SVG images because of its several advantages, including:
To maximize these advantages, explore the programmatic approach to upload SVG image in a Magento 2 custom module.
For a pragmatic solution, visit https://meetanshi.com/blog/upload-svg-image-in-magento-2-custom-module/