Is it possible to change img src attribute using css?

You can use :

content: url("/_layouts/images/GEARS_AN.GIF")

There is another way to fix this : using CSS box-sizing.

HTML :

<img class="banner" src="http://domaine.com/banner.png">

CSS :

.banner {
  display: block;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  background: url(http://domain2.com/newbanner.png) no-repeat;
  width: 180px; /* Width of new image */
  height: 236px; /* Height of new image */
  padding-left: 180px; /* Equal to width of new image */
}

http://css-tricks.com/replace-the-image-in-an-img-with-css/

Tags:

Css

Image

Src