Since djangocms_picture pluging does not allow us to use SVG files, we code this small plugin. It is inteded to be very simple but useful to insert SVG images on our pages as need it.
You can install the plugin by:
- Executing the following command:
pip install git+https://github.com/pablo-pinargote/djangocms_svgimage
- Adding the plugin to your CMS INSTALLED_APPS settings variable.
INSTALLED_APPS = [
...,
'djangocms_svgimage',
]
- Executing plugin migrations to create the corresponding model:
python manage.py makemigrations djangocms_svgimage
python manage.py migrate djangocms_svgimage
Using the plugin is very straightforward, we just select it from the plugin's list, select the file and enter the image width and height parameters accordingly.