• Resolved marleekate

    (@marleekate)


    Image dimensions are being added just fine on regular images, but on SVG images they are missing, how can this be fixed?

    On the referenced URL, you can see all the company logos do not have image widths/heights set, but others on the page do.

    Report Number: QSPZLGIT

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support qtwrk

    (@qtwrk)

    I think probably due to this style = "max-height: 61px"

    but please try enable debug log , it will provide more detail

    A primary reason for missing width and height attributes is, that svg is not an image, it is a document, although it is embedded in img tag. An svg “image” can’t be sized with html width and height attributes. If width and height are set this doesn’t change the real size of an svg, so it is absolutely correct that there are no width and height attributes.

    grayayer

    (@grayayer)

    @marleekate -If you create a rule in your theme that all SVG images are shown at width:auto, that should help.

    img[src$=".svg"] {
        width: auto;
    }

    Then just make sure that the inherent size of the svg (saved from the program) is at the size you want it displayed on the site.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘SVG Images Missing Dimensions’ is closed to new replies.