Inline SVG: How does scaling work?
-
Hi there,
how does inline SVG scaling work?
Using the standard Gutenberg image block in the setting panel the “Image Dimensions” (25%,50%,75%,100%) do scale the SVG inside the editor just fine. But in the front-end the SVG is always displayed full size.
To be more precise if for example the SVG is scaled down to 25% in the editor then the browser in the front-end shows the scaled down 25% image for a fraction of a second. But shortly after it switches back to 100%. You can see this if you hit the browser refresh button multiple times in the front-end.
I did setup your plugin in advance mode with option “Force inline SVG” enabled. The advanced option “Automatically inser class” I tried both on and off mode.
I have to use the inline SVG method because my SVG files contain font graphics and a custom symbol font. Correct me if I’m wrong, I’m no expert in this matter.
I use the latest WordPress 5.3.2 and the Gutenberg block editor. In the editor I use the normal image block to add the SVG image into my post.
So how to scale inline SVG? Does it only work with CSS. If so can you please provide a short CSS snippet and tell where to insert the code?
Many thanks in advance,
BerndThe page I need help with: [log in to see the link]
- The topic ‘Inline SVG: How does scaling work?’ is closed to new replies.