Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An example of server side responsive images based on device detection.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 src
Octocat-spinner-32 Procfile
Octocat-spinner-32 README.md
Octocat-spinner-32 pom.xml
README.md

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.

Setup

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 http://sourceforge.net/projects/wurfl/files/WURFL/2.2/ and put it here src/main/webapp/WEB-INF/wurfl.zip

Example

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=http://farm3.static.flickr.com/2782/4455976588_936f517e16_o.jpg"/> 

License

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 http://www.gnu.org/licenses/.

Something went wrong with that request. Please try again.