Support » Plugin: Scalable Vector Graphics (SVG) » SVG in image gallery is not working

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author Sterling Hamilton

    (@sterlo)

    This is fixed in the latest version!

    Thread Starter Nuriaruiz

    (@nuriaruiz)

    Hi, it doesn’t work on my website. It doesn’t display the file svg.
    nuriaruizporfolio.com

    Thanks!

    Plugin Author Sterling Hamilton

    (@sterlo)

    What version of WordPress and what version of the plugin do you have?

    Thread Starter Nuriaruiz

    (@nuriaruiz)

    I have 4.5.3 WordPress Version and 3.1 Scalable Vector Graphics (SVG) version.

    Plugin Author Sterling Hamilton

    (@sterlo)

    Thanks.

    I’d like to understand the problem a little better.

    1. Does it display properly in the gallery?
    2. Where is it not displaying properly?
    3. Does it have a height and width associated to it?
    4. Does it work outside of WordPress — or — can you just drag and drop it from your local machine into your browser and it shows up fine?
    Thread Starter Nuriaruiz

    (@nuriaruiz)

    Ok, here is the link and you’ll see exactly what’s happening.

    http://nuriaruizportfolio.com/virino-dinamita/

    The first image is a svg image.

    Thanks
    N

    Plugin Author Sterling Hamilton

    (@sterlo)

    Plugin Author Sterling Hamilton

    (@sterlo)

    Yeah, if I go to that page, and then search the source code for “svg” — nothing comes up.

    Thread Starter Nuriaruiz

    (@nuriaruiz)

    This is so weird! because I’m uploading svg files, and then when I inspect the file, it’s a png…

    Is it that possible? 😐

    Plugin Author Sterling Hamilton

    (@sterlo)

    Well that featured image is coming from the Theme itself.
    It’s not like you uploaded ABC.svg and it became ABC.png — I would assume that something is going on with the team.

    But I will do a real fast test to make sure that featured images are working properly within the plugin.

    Plugin Author Sterling Hamilton

    (@sterlo)

    Well, good news, the plugin isn’t doing anything that would cause that problem.

    I added an SVG as a featured image and it went to the front end as an SVG.

    Though… I need to now add a hack for height/width there.
    Anyway, this bug you are experiencing, I am almost 100% sure it’s the Theme you are using and not a problem with the Plugin.

    Thread Starter Nuriaruiz

    (@nuriaruiz)

    I don’t know if I understand what you say.

    You mean the issue is with the theme, not with the Plugin. But, do you think is it possible to solve the issue in the theme?

    By the way, I updated the plugin to the new version.

    Plugin Author Sterling Hamilton

    (@sterlo)

    So I did you a favor, I downloaded your Theme and took a look at the code.
    I set it up locally and replicated your problem.

    I will track down the issue.

    There’s a way the Author could change how they are getting featured images and this would fix the problem.

    They are currently relying on wp_get_attachment_metadata and that’s not working for some reason.

    So that means either I did something wrong in my plugin or there is a core bug.
    But regardless, the Author of your Theme could add a work around here.

    Plugin Author Sterling Hamilton

    (@sterlo)

    Just documenting it here — wp_generate_attachment_metadata in core would be the place this is failing if this is indeed something that I was taking for granted in the plugin.

    I may need to augment the functionality of this core method so that the meta information is in fact generated for uploaded files.

    Before I start down that path I will take a look at how others are handling this.

    Plugin Author Sterling Hamilton

    (@sterlo)

    Alrighty — so after a little bit of hunting I know what needs to happen.

    FOR YOU: You should contact the developer of your them here: http://wpshower.com/themes/expositio/

    You request could be something around:

    Hey there, your Theme is using wp_get_attachment_metadata() for determining if it should use the default featured.png file or the provided image — this isn’t working with SVG files at the moment, could you use a different method to work with file attachments?

    FOR ME: I’m submitting a ticket to core to help address the problem. I will later, add a function that might supplement the core feature until it comes out.

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