This is a general question to discuss approaches to filtering WordPress image sizes based on the browser/platform (such as a smart phone or netbook or desktop). The idea being that on a mobile we don’t want to force people to download a 100kb image when a 20kb one would be big enough for their screen, thus saving them and yourself, bandwidth.
The outcome would be to make using CSS media queries a viable alternative to a separate theme for a mobile version of a site.
There are a few points to consider:
User Interface
What would be the best way to allow a user to control the thumbnail and medium image sizes etc… for different platforms or indeed just for different screen sizes?
Device Detection
What would the best way to detect the device/UA’s screen capabilities on the server side. Are there any plugins that do this already?
Implementation
How would you go about writing the code to create the different thumbnails, and then to alter WPs output according to the device / screen size? Ideally this would be theme agnostic so a call to the_post_thumbnail('medium')
would return the appropriate size of image for the device/platform.
Try tinysrc.net, they do the hard work for you. I havenât tested it, but it sounds promising.