title: How to set background-image using img tag
body: <p>I have a php method such that it will return an html IMG tag.For example <code>ImageClass::getImage('sample.png' , 'myTilte')</code> will return a string as <code>&lt;img src="sample.png" title="mtTilte" /&gt;</code></p>
  
  <p>In my css file there is place I used 
      <pre>
          div.error {
          background-image: url('sample.png');
          background-repeat: no-repeat;
          }
      </pre></p>
  
  <p>How I use <code>ImageClass::getImage</code> method to instead of url() method in css for background-image.</p>