How to specify a class for img tag defining the extension of the image in Less?

Tell me how to specify a class for img tag defining the extension of the image?
More specifically, I need to set the style for images

<img class="responsive-image" src="image/kartinka.svg">


but only if it is SVG , and jpg if you want another class...
June 5th 19 at 21:10
1 answer
June 5th 19 at 21:12
Solution
Class through less you put down. And here is how you can style depending on the format:
img[src$="svg"]{
 //styles for svg
}
Thank you Andrew. Not working, but I know in what side now to dig. - Erich80 commented on June 5th 19 at 21:15
checked at home. All svg styles got. What exactly doesn't work? - Fatima commented on June 5th 19 at 21:18
Sorry. cache... )))
Everything works - Erich80 commented on June 5th 19 at 21:21
Again thanks. You're a professional - you know that! - Erich80 commented on June 5th 19 at 21:24

Find more questions by tags LayoutLess