# Pinegrow Plugin not showing or inserting SVGs correctly

**URL:** <https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531>\
**Category:** Bug Reports\
**Tags:** wordpress, plugin\
**Created:** [December 27, 2022, 2:58am UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531 "2022-12-27T02:58:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [December 27, 2022, 2:58am UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/1 "2022-12-27T02:58:40Z")

</div>

Running Pinegrow Plugin 1.0.2 and 1.0.4 (I haven’t tested other versions) on both my dev server and on LocalWP, I’m having trouble inserting an SVG from the media library into an IMG element. The first sign of trouble is in the insert menu, where SVGs aren’t displaying.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/a/a4b89937e1ba8193da698e879647d905826b3da2.jpeg)

Then, when I look at the code, I see that the path isn’t inserted correctly.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/a/accbb2a2729c6282355bf006d738bbac53af839a.jpeg)

Output from the console: (On one line it looks like it’s trying to pull the SVG image from the root of my uploads folder)

```auto
https://pinegrow.peakperformance.dev/wp-content/uploads/logoipsum-logo-6.svg

```

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/f/f5ddbe27b8a81a5c306d4840701b2921e51b2e12.jpeg)

Correcting the path manually in the code editor works as expected.

---

<div class="post-metadata">

**Author:** ![schpengle](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/schpengle/32/238_2.png) [@schpengle](https://forum.pinegrow.com/u/schpengle)\
**Post date:** [December 27, 2022, 8:47am UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/2 "2022-12-27T08:47:31Z")

</div>

Hello there, well, haven’t you been a busy bee? I guess your bored with Xmas already and moved on 😃  
anyway, humour aside , I’ve just noticed a bit of a similarity in a couple of bug reports (which are somewhat out of my depth) but just wondering, do You think this is in part due to this other, somewhat similar bug report?

Im not sure if any theme importing etc was implemented by your good self (I’d have thought not but… )

> [@Images folder not uploaded](https://forum.pinegrow.com/t/images-folder-not-uploaded/7525/2):
>
> (I hadn’t explored this aspect thoroughly and from my tests, following your message, here’s what it comes up) When you import an existing HTML template, the images that are not used in the static part of your HTML are automatically imported into the WordPress library so you can select them to build your theme from the Pinegrow plugin. So if none of the images in your imported project are part of the HTML, then you won’t find the folder in the root but the images will be available in the WordPr…

Wordpress, images expected to be in the root for some reason? I was just wondering if @Emmanuel’s findings would clarify the behaviour you’ve noticed… in this one of several in your flurry of bug reports.  
Good stuff 😃  
more grist for the mill \<3

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [December 27, 2022, 1:12pm UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/3 "2022-12-27T13:12:28Z")

</div>

Haha, I’m a Scrooge through and through. Besides, I have a few tight deadlines and a busy family week so I’m trying to squeeze in work wherever I can.

The reports I submitted have nothing to do with the post you linked. I’m not using the Plugin for this project and all the issues were just part of the regular builder functionality. I just happened to see this problem while I was verifying one of the other issues I submitted.

And don’t get tripped up by Emmanuel’s language on that linked article. He wasn’t really saying anything about the root directory, he was just saying that images from a desktop project would be imported into the WP media library but that they wouldn’t be viewable in the project directories like we see on the desktop. Basically, It’s working as designed.

As far as I can tell, the reports I submitted are all minor UI issues since I can work around them by modifying the HTML directly.

---

<div class="post-metadata">

**Author:** ![Emmanuel](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/emmanuel/32/6294_2.png) [@Emmanuel](https://forum.pinegrow.com/u/Emmanuel)\
**Post date:** [December 27, 2022, 1:18pm UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/4 "2022-12-27T13:18:38Z")

</div>

> [@adamslowe](#):
>
> And don’t get tripped up by Emmanuel’s language on that linked article.

Not just in this article, in general too!!!  
Because english is not my native language, sometimes (often?) I can mess up on some expressions 😉

---

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [December 27, 2022, 8:48pm UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/5 "2022-12-27T20:48:42Z")

</div>

@adamslowe how are you uploading SVG images? Which “Allow SVG” plugin are you using on the site?

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [December 27, 2022, 9:22pm UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/6 "2022-12-27T21:22:01Z")

</div>

I tried [SVG Support – WordPress plugin | WordPress.org](https://wordpress.org/plugins/svg-support/) on my server and LocalWP. I did it by importing a project with SVGs and by uploading them first.

I’m pretty sure I also tested with ShortPixel’s plug-in but don’t remember specifics now. [WP SVG Images – WordPress plugin | WordPress.org](https://wordpress.org/plugins/wp-svg-images/)

I’ll test again and do a loom video when I’m back at a computer.

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [December 28, 2022, 12:04pm UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/7 "2022-12-28T12:04:52Z")

</div>

@matjaz Here is a Loom showing the behavior with both the [SVG Support – WordPress plugin | WordPress.org](https://wordpress.org/plugins/svg-support/) plugin and the [WP SVG Images – WordPress plugin | WordPress.org](https://wordpress.org/plugins/wp-svg-images/) plugin. The behaviors are slightly different for each one. In both tests I manually uploaded the files and created new Pinegrow projects to simplify it so you can try to reproduce it on your end.

WP SVG Images:

- I don’t see the SVG previews in the Pinegrow media browser
- I don’t see the media sizes in the PG media browser
- When you add the SVG via Pinegrow, the path is /wp-content/uploads//

SVG Support

- I don’t see the SVG previews in the Pinegrow media browser
- I DO see the media sizes in the PG media browser
- When you add the SVG via Pinegrow, the path is /wp-content/uploads/./filename.svg

[  
Pinegrow WP SVG Tests - Watch Video  
  ![](https://cdn.loom.com/sessions/thumbnails/b76587a1c7784cad9692ee8a1bfadea2-with-play.gif)](https://www.loom.com/share/b76587a1c7784cad9692ee8a1bfadea2)

---

<div class="post-metadata">

**Author:** ![Dom](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/dom/32/4887_2.png) [@Dom](https://forum.pinegrow.com/u/Dom)\
**Post date:** [December 28, 2022, 1:19pm UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/8 "2022-12-28T13:19:03Z")

</div>

Silly question, but have you tried dispensing with the plugins altogether and just adding basic svg support via php?

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [December 28, 2022, 1:32pm UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/9 "2022-12-28T13:32:05Z")

</div>

I’m paranoid and want the sanitization features in the plugins. But yes, I’ll give that a try next.

---

<div class="post-metadata">

**Author:** ![Dom](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/dom/32/4887_2.png) [@Dom](https://forum.pinegrow.com/u/Dom)\
**Post date:** [December 28, 2022, 1:41pm UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/10 "2022-12-28T13:41:05Z")

</div>

Oh I do get the paranoia aspect.

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [December 28, 2022, 3:05pm UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/11 "2022-12-28T15:05:55Z")

</div>

Thanks for the nudge to test with a generic function. I used the code below and it exhibited the same behavior as the “WP SVG Images” plugin, unfortunately.

```auto
function enable_svg_upload( $upload_mimes ) {
    $upload_mimes['svg'] = 'image/svg+xml';
    $upload_mimes['svgz'] = 'image/svg+xml';
    return $upload_mimes;
}
add_filter( 'upload_mimes', 'enable_svg_upload', 10, 1 );

```

---

<div class="post-metadata">

**Author:** ![Dom](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/dom/32/4887_2.png) [@Dom](https://forum.pinegrow.com/u/Dom)\
**Post date:** [December 28, 2022, 3:55pm UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/12 "2022-12-28T15:55:30Z")

</div>

That does rather suggest that there is something else at play here.

---

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [December 30, 2022, 12:19am UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/13 "2022-12-30T00:19:00Z")

</div>

Thanks @adamslowe @Dom this has been addressed in 1.0.6. Re-uploading SVGs might be needed.

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [December 30, 2022, 12:31am UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/14 "2022-12-30T00:31:12Z")

</div>

Matjaz is a lean, mean, bug-fighting machine.

Don’t worry though, I’ll find more for you 😁

---

<div class="post-metadata">

**Author:** ![schpengle](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/schpengle/32/238_2.png) [@schpengle](https://forum.pinegrow.com/u/schpengle)\
**Post date:** [December 30, 2022, 12:40am UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/15 "2022-12-30T00:40:27Z")

</div>

Blinking heck!  
Ive only just dowloaded and installed 1.0.5 !

Not even ran it yet… this is a rather industrial phase in the PG History…

---

<div class="post-metadata">

**Author:** ![madjedo](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@madjedo](https://forum.pinegrow.com/u/madjedo)\
**Post date:** [January 4, 2023, 12:52pm UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/16 "2023-01-04T12:52:18Z")

</div>

@matjaz I can’t export blocks made with Pinegrow desktop (7.05) that contains svg. I have a plugin for svg support to no avail.

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [January 4, 2023, 1:05pm UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/17 "2023-01-04T13:05:07Z")

</div>

Do you get any sort of error in Pinegrow or WordPress? I just created some blocks yesterday with in-line SVG and linked svg files with no problem using desktop 7.05.

---

<div class="post-metadata">

**Author:** ![madjedo](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@madjedo](https://forum.pinegrow.com/u/madjedo)\
**Post date:** [January 4, 2023, 1:17pm UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/18 "2023-01-04T13:17:52Z")

</div>

No errors or anything.

Just blocks that contain any svg dont register in gutenberg.

Removing the svg and re-exporting, then blocks gets registered and can be used. Obviously without svg though…

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [January 4, 2023, 1:38pm UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/19 "2023-01-04T13:38:13Z")

</div>

Silly question… have you tried a different SVG to see if there is something weird with the one you are using? I know for a fact that the Facebook, Twitter, Instagram, and TikTok icons from Remix work (that’s the block I just made yesterday)

[Remix Icon - Open source icon library](https://remixicon.com/)

---

<div class="post-metadata">

**Author:** ![madjedo](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@madjedo](https://forum.pinegrow.com/u/madjedo)\
**Post date:** [January 4, 2023, 2:06pm UTC](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531/20 "2023-01-04T14:06:11Z")

</div>

Yes maybe. I will check the svg code and I will try some hours later today and let you know.

[Next page](https://forum.pinegrow.com/t/pinegrow-plugin-not-showing-or-inserting-svgs-correctly/7531.md?page=2)
