Title: SVG Images Missing Dimensions
Last modified: May 31, 2022

---

# SVG Images Missing Dimensions

 *  Resolved [marleekate](https://wordpress.org/support/users/marleekate/)
 * (@marleekate)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/svg-images-missing-dimensions/)
 * 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsvg-images-missing-dimensions%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/svg-images-missing-dimensions/#post-15697254)
 * I think probably due to this `style = "max-height: 61px"`
 * but please try enable debug log , it will provide more detail
 *  [serpentdriver](https://wordpress.org/support/users/serpentdriver/)
 * (@serpentdriver)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/svg-images-missing-dimensions/#post-15697979)
 * 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](https://wordpress.org/support/users/grayayer/)
 * (@grayayer)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/svg-images-missing-dimensions/#post-16224659)
 * [@marleekate](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

## Tags

 * [dimensions](https://wordpress.org/support/topic-tag/dimensions/)
 * [images](https://wordpress.org/support/topic-tag/images/)
 * [SVGs](https://wordpress.org/support/topic-tag/svgs/)

 * 3 replies
 * 4 participants
 * Last reply from: [grayayer](https://wordpress.org/support/users/grayayer/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/svg-images-missing-dimensions/#post-16224659)
 * Status: resolved