JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-controller='ctrl'>
<div ng-repeat="kitten in kittens" back-img="https://fbcdn-sphotos-b-a.akamaihd.net/{{kitten.w}}/{{kitten.h}}.jpg" ></div>
</div>
CSS
div[back-img]{
width: 225px;
height: 150px;
}
JavaScript
var app = angular.module('app',[]);
app.controller('ctrl', function($scope, $timeout){
$scope.kittens = [
{w:"hphotos-ak-prn1", h:"941535_4362554282267_1111738241_n", t:"www.google.com"},
{w:"hphotos-ak-prn1", h:"20514_4668632214024_2030094094_n", t:"www.google.com"},
{w:"hphotos-ak-prn2", h:"971043_4673159007191_939558996_n", t:"www.google.com"},
{w:"hphotos-ak-prn1", h:"1208792_4739558547138_939059740_n", t:"www.google.com"}
];
});
app.directive('backImg', function(){
return function(scope, element, attrs){
attrs.$observe('backImg', function(value) {
element.css({
'background-image': 'url(' + value +')',
'background-size' : 'cover'
});
});
};
});