Is it possible to make a Clarification:
Maybe using javascript, you can get the url to the image:
var img = document.getElementById('image').style.backgroundImage;
var width = img.clientWidth;
var height = img.clientHeight;
document.getElemetById('image').style.width = width;
document.getElemetById('image').style.height = height;
I strongly suspect you cannot do this exclusively with stylesheets.