1

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.

1

Try tinysrc.net, they do the hard work for you. I haven’t tested it, but it sounds promising.

  • Looks like a really handy service that. I'd still like to see if it could be done within wordpress itself though, rather than relying on a 3rd party. I'm not saying they would but they could start charging or rate limiting etc... – sanchothefat Jan 18 '11 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.