Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

SVG Formatter

5,336 sites Security covered
View on drupal.org

This module allows you to upload and display SVG image files on your Drupal website. It provides a special formatter for file fields that enables you to control the size and attributes of your SVGs, and can even embed them directly into your pages for advanced styling with CSS and JavaScript.

SVG Formatter module provides support for using SVG images on your website.

The standard image field in Drupal doesn't support SVG images. This module adds a new formatter for the file field, which allows files with any extension to be uploaded. In the formatter settings, you can set the default image size and enable alt and title attributes. If you want to add some CSS and Javascript magic to your SVG images, then use the inline SVG option.

You can also use this module in combination with SVG Image module. If that module is installed, you can use the SVG Formatter formatter for the image field.

Installation

Composer

composer require drupal/svg_formatter

Drush

drush en svg_formatter -y

How to use it?

Drupal and SVG images - Blog post describing how to use the module

Screencast: https://youtu.be/ctussLn-2Ck

1. Add a file field to your content type, taxonomy, or any other entity type, and add svg to the allowed file extensions.
2. Go to the 'Manage display' and change the field format to 'SVG Formatter'.
3. Set image dimensions if you want and enable or disable attributes.

Activity

Total releases
1
First release
Aug 2025
Latest release
11 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
2.0.5 Stable Aug 15, 2025