Site logo

Archived topic

GDRP and custom Icons

5 replies · Started by Matthias on May 19, 2022

Viewing posts 1–6 of 6

Hi there,

i just saw that you could add custom icons via generateblocks into gp.
in this video by Leo

https://www.youtube.com/watch?v=wdzFximLiQs

What i don't get/know about custom svgs added like that: what about data security? Are those via code added svgs loaded from an external source?
If so - is there a way to host them locally - like with fonts.

Hi there,

GenerateBlocks uses inline SVG - so theres no option at this time to load them from an external file. The advantages of inline is there is no external resources so it removes additional network requests.

Security wise, both WP and GenerateBlocks sanitizes any SVG HTML added to the icon field so this will minmise the risk of malicious code be entered. And ideally you should only add SVGs from a trusted source.

so asked like someone who doesnt get it:
if you look for an svg, copy+paste the code like leo did in the video - and add that code to your page:
It is stored on my page? Just like the icons that are available in the gb-block out-of the box?

Not quite sure i get that inline concept ;) - and
1. if you talk about an svg e.g. added via code in the icon section of the headline block in "Icon-SVG-HTML"
or
2. only those available out-of-the-box in the very same section under "general" and "social media".

It is stored on my page? Just like the icons that are available in the gb-block out-of the box?

Yes - the code Leo pasted in is the SVG HTML that is saved inline on your page.

If you select one of the predefined Icons ( General, Social ) it simply pastes in the SVG Code.
So in both cases the SVG HTML is added inline - see here for example its from our website and its using the Tick icon form the General icons panel:

https://www.screencast.com/t/vjebxeudK0cj

As a note GB Pro allows you to save SVG Icons as Assets:

https://docs.generateblocks.com/article/asset-library/

So you can create your own panel of icons. And those too are still inserted inline.

thx a lot.

You're welcome

This archived topic is closed to new replies.