Img Element and SVG

I can use the original Image element to place an SVG but with the latest build of PRO and the new image element I cannot place an SVG. It shows in the builder but when it renders it is gone. Curious to know if there is a workaround for this.

Here is an example: I’m using the Grid Element with nested Grids and in the first nested grid I am using a regular image. It shows fine but does extend past the cell height of 200px which may also be an issue since I thought it would be forced to remain within its cell. The next image, an SVG of a skull, is visible (its using the V1 image element) In that same cell there is a V2 image element using the same SVG but it flashes and then gets lost. At the very bottom of the page I have another section with the same image without a Grid and the SVG graphic inside a V2 element is not visible.

http://backalley.citysidewalk.ca/?page_id=756

Hi @dabigcheeze,

Thank you for writing to us. I checked the page in question and here is the result:

Image getting outside of boundaries of the cell:

My guess is that you have set the Rows Template option of the Grid Element to something like this:

The 200px value is causing the issue and you need to change that.

SVG Issue:

I checked the case on my installation and the SVG works correctly with no problem using the Image element and not the classic image. WordPress does not have SVG support by default and you must have used a third party plugin or a piece of code in the functions.php of your Child Theme.

The method you used to enable the SVG support might be the problem cause. I suggest that you remove whatever method you used and use this plugin instead. It is important that the SVG image is sanitized before the usage and the plugin in question does that.

The other point that I see on the front end of your website is that, instead of a link to an external image file with SVG extension, the SVG XML code is directly used which might be the cause of the problem.

kindly get back to us with the result of the steps above and URL/User/Pass of your WordPress dashboard using the Secure Note functionality of the post to follow up the case if you still have problems.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.