Demonstration of the problem:
, src, , CSS .
:
<img class="visible-xs img-responsive" src="http://placehold.it/768x150" />
<img class="visible-sm img-responsive" src="http://placehold.it/992x150" />
<img class="visible-md img-responsive" src="http://placehold.it/1200x150"/>
<img class="visible-lg img-responsive" src="http://placehold.it/2000x150"/>
jsFiddle
, , , :

+ -
CSS Background Images , :
div:
<div class="responsiveBackgroundImage" id="myImage" ></div>
sub :
, , , :
.responsiveBackgroundImage {
width:100%;
background-size: 100%;
background-position: 50% 0%;
background-repeat: no-repeat;
}
background-image :
#myImage {background-image: url(http://placehold.it/768x150); }
@media (min-width: 768px) { #myImage { background-image: url(http://placehold.it/992x150); }}
@media (min-width: 992px) { #myImage { background-image: url(http://placehold.it/1200x150);}}
@media (min-width: 1200px) { #myImage { background-image: url(http://placehold.it/2000x150);}}
jsFiddle
Javascript
- img, . , , - , angular ng-src , URL-. , src="{{personImageUrl}}". angular URL , , .
src data-. -, .
<img class="visible-xs img-responsive" data-src="http://placehold.it/768x150"/>
, .
$dynamicImages = $("[data-src]");
, , . :
$(window).resize(function() {
}).resize();
, . , data , .
$dynamicImages.each(function(index) {
if ($(this).css('display') !== 'none') {
this.src = $(this).data('src');
$dynamicImages.splice(index, 1)
}
});
jsFiddle