You can add or make SVG images working on your WordPress website by adding the below-mentioned code in respective files. Please follow the below steps.
Step 1: To add or display SVE images, you first navigate to the admin panel > Appearance > Customize > General Theme options > Other settings and mark “on” to display SVG images.
To know more about this, click here.
Step 2: Copy the below-provided code and open the “/wp content/themes/litho/functions.php” file under your project root folder. Now paste the copied code to the same file.
function cc_mime_types($mimes) {
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
add_filter('upload_mimes', 'cc_mime_types');
Step 3: Copy the below-provided code and open the “/wp-content/wp-config.php” file under your project root folder and paste this line above where it says /* That’s all, stop editing! Happy publishing. */
define('ALLOW_UNFILTERED_UPLOADS', true);