Better solution for img/src in style functions