News for hackers. Stuff that matters.
Re:How a new HTML element will make the Web faster by ollysb on Tuesday September 02, 2014 @09:41AM (#8257441)
A simpler solution might be

    <img src="image.jpg" sizes="640,800,1024"/>
Then then the browser can choose the most appropriate size based on the screen size. The filenames would simply follow the convention, image-640.jpg, image-800.jpg etc. older browsers would simply use the original src.
Re:How a new HTML element will make the Web faster by Steuard on Tuesday September 02, 2014 @12:53PM (#8258707)
To my eye, it's a little odd to read an article about multiple groups of experts who spent months or years hashing out a difficult problem, and then to see a comment like this one that proposes its own much simpler solution.

Is your thought here that not one of the dozens of people involved considered this sort of syntax during those months or years or work? (That seems unlikely.) Or do you think their reasons for rejecting it were unsound? (You don't seem to have said why.) I'm just not understanding what you're aiming for here.

Re:How a new HTML element will make the Web faster by ollysb on Tuesday September 02, 2014 @02:16PM (#8259191)
Their proposed solution offers more flexibility in that you can use media queries to specify the upper/lower bounds and also specify the filenames. This feels over-engineered though, firstly because the above solution provides enough information to switch between images (we're not changing the layout here) and secondly because a filename convention is adequate for referencing them. The third reason that I dislike their solution is that it introduces presentation logic(media queries) into html.
Re:How a new HTML element will make the Web faster by eurleif on Tuesday September 02, 2014 @02:18PM (#8259205)
Arguably, <img> was already a form of presentation logic present in HTML. This just makes it more capable.
Re:How a new HTML element will make the Web faster by ollysb on Tuesday September 02, 2014 @10:51AM (#8257888)
Another option would be to allow the source to be specified in css (stylesheets are loaded before images anyway). Then you could do

    <img id="cats" src="fallback_for_old_browser.png" />

    @media (max-width: 600px) {
      #cats {
        src: url('http://cats.com/cats-600.png');
      }
    }
Re:How a new HTML element will make the Web faster by kaoD on Tuesday September 02, 2014 @12:33PM (#8258582)
No please. CSS is meant for presentation, not content.
Re:How a new HTML element will make the Web faster by swift on Tuesday September 02, 2014 @12:59PM (#8258748)
We'll need a solution in CSS for properties like background-image and border-image. (Indeed, there have been multiple proposed solutions already.) It would be nice to use the same mechanism for both CSS and content images instead of introducing yet another case in the web platform where we have multiple slightly-incompatible mechanisms that do the same thing.
Re:How a new HTML element will make the Web faster by tomjen3 on Tuesday September 02, 2014 @01:08PM (#8258790)
Can we replace the WW3C with you? Then maybe they could, finally, get up to speed.