WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


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.

share|improve this question
up vote 1 down vote accepted

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

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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