Support » Plugin: Add Full SVG Support » SVG in image gallery is not working

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jens

    (@jekuer)

    Hi,

    That does not work. You’re right. However, this is basically not a bug, because this process is not part of the plugin.
    The plugin enables you to integrate svg images via a shortcode. The fact that you can load the svg via the WordPress image functionality has nothing to do with this plugin (the same applies for the gallery).

    The problem is that WordPress resizes images and uses those generated files for the gallery (and regular images, if selected). But you cannot resize SVGs like you resize a PNG. That’s why WordPress has no information for e.g. the thumbnail of the SVG.
    Here’s a little workaround for galleries:
    You can add detailed size information into the gallery shortcode.
    Go to the text editor, look for the gallery shortcode, and add the size-information. It should look like this:
    [gallery ids="1940,1939,1920" size="140,100"]
    Downside: every image gets the same size. The only other way here would be to use “full” instead of width and height.
    Try: [gallery ids="1940,1939,1920" size="full"]
    As mentioned earlier, all other size-names like “thumbnail” want work out of the box.

    Hope this helps.

    Nuriaruiz

    (@nuriaruiz)

    Hi, Thanks for your answer. Unfortunately it didn’t work. 🙁

    Nuriaruiz

    (@nuriaruiz)

    Hi, Thanks for your answer. Unfortunately it didn’t work. 🙁

    I wanted to add SVG images in my galleries because the vectorial images previously saved in jpg, gif or png are displayed blurry and I couldn’t fix it.

    Do you think I can save the vectorial images in another format or do another saved for display vectorial images as good as can be?

    Thanks

    Plugin Author Jens

    (@jekuer)

    If you save a vector image as jpg, it is no longer a vector image ;-).
    SVG is the most solid format for web development with vectors (imho) – you should use this.

    I think your problem is very specific and as mentioned before, it is not really about this plugin.

    Plugin Author Jens

    (@jekuer)

    You could try other svg plugins. Maybe one of them has a more advanced solution. Alternatively, you could build a workaround for your gallery approach on your own.

    Nuriaruiz

    (@nuriaruiz)

    Ok, thank you so much for your help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘SVG in image gallery is not working’ is closed to new replies.