Reputation: 1497
I am working on Responsive site which has many large images...
I am aware of how to resize/hide the images for mobile devices. In this case, images are loading and hiding which is causing more internet data from the user's device.
Instead, I dont want to load the large images if somebody is viewing on the mobile
Any Help Please?
Upvotes: 0
Views: 834
Reputation: 5831
You can import you're image in css like that :
@media screen and (min-width:800px){
.class{
background-image:url('large.png');
}
}
and redefine you're class for mobile
@media screen and (max-width:500px) {
.class{
background-image:none;
}
}
Upvotes: 2