[whatwg] add html-attribute for "responsive images" Mathew Marquis

Irakli Nadareishvili irakli at gmail.com
Mon Feb 6 13:44:12 PST 2012


Mathew,

thanks for raising that point.

I think we need to decide whether markup-based solution is a workaround forced on us because there was no good solution or whether it is a solution we should pursue, if implemented properly.

And this brings us to a very technical discussion about RESTfulness of either approaches (server-side negotiation vs. markup-based descriptors).

-- Pros of server-side negotiation:

If you look at an image as a unique resource, then representing it with a unique URL and adjusting diff crops or resolutions of the image for device-targeting based on HTTP headers is very much like using unique resource URL and altering output format based on accept headers, which is the RESTful and recommended approach.

I can see an argument that diff crops of the same image are not the same resource, but esp. in the context of targeting diff. devices, I think that's not true. If XML and JSON versions of a document are the same resource, then device-specific versions of an image should be as well.

Good food for thought, however.

Thanks,

Irakli 



More information about the whatwg mailing list