I am looking to implement responsive image sizing based on the webpage size. My images come in two different sizes:
<img src="images/img1.jpg" data-big="images/img1.jpg" data-small="images/img1small.jpg" alt=""></img>
The data-small image has a width of 100px.
@media (max-width:600px) {
img[data-small] {
content: attr(data-small, url); <-- unfortunately not functioning
/*width:10px;*/ <-- this solution would work better
}
}
My testing has been done on Firefox 37.0.1, Chrome 42.0.2311.90 m and Internet Explorer 11.
Despite my efforts, when I resize the browser width to under 600px, the image remains unchanged.