Skip to content


Subversion checkout URL

You can clone with
Download ZIP
An example of server side responsive images based on device detection.
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Server Side Responsive Images

This is an example of using device detection to create server side responsive images.

The device detection is provided by the WURFL database and Java library. The images are scaled based on the device height and width.


The project is set up to run using Heroku or localy by executing the ResponsiveImage class. Before deploying you will need to download the latest WURFL database from and put it here src/main/webapp/WEB-INF/


A test page is included in the source to demo the service. You can find it at the root of the site.

The following is an example of how to use the service once it is running:

   <img src="/rimage/?src="/> 


Copyright (C) 2011 Carson McDonald

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see

Something went wrong with that request. Please try again.