Based on your comment on @NullDev, you will need to create a div with the appropriate size and apply the image as the background image for the element to determine what is loaded via CSS.
For instance:
HTML:
<div id="image"></div>
CSS
#image { position: relative; width: 400px; height: 400px; background-image:url('/path/to/image'); background-size: cover; background-repeat: no-repeat; }
Then apply the media query:
@media only screen and (max-width : 480px) { #image{ background-image:url('/path/to/mobile/image'); } }
Hope this helps.
source share