Solved

Use SVG as external files and not inline code

  • 18 June 2021
  • 5 replies
  • 83 views

Hi!

I have a page that uses a lot of the same SVG images and it makes the DOM quite heavier than it should be. Is there an easy way to use SVG as external files rather than inline code?

Cheers!

icon

Best answer by Abner Rojas 18 June 2021, 13:56

View original

5 replies

Userlevel 7
Badge +4

You can use them as images.  I use the “SVG Support” plugin so you can add svg images to your media library just like any other image.

https://wordpress.org/plugins/svg-support/

 

 

I’ve also installed “SVG Support” plugin, and it works quite well, but the problem in Elementor remain,
because I can upload SVG images in Media library page, but I can’t from the Elementor Editor page.
So the simple trick is upload all svg from Media page and the you will find them and selectable in the Editor.
This should be fixed by Elementor, because SVG are really common and used on the web!

Userlevel 7
Badge +4

check out your Elementor Advanced settings and enable unfiltered file uploads so you can upload svg or json for lotties: 

 

Hi @Abner Rojas ! Thanks a lot. This solved my problem :). (sorry for the late reply → weekend)

Userlevel 7
Badge +4

Hi @Abner Rojas ! Thanks a lot. This solved my problem :). (sorry for the late reply → weekend)

No problem!

Reply