Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Responsive Image Class idea


12 Posts   1514 Views


17 January 2013 at 9:37am Forum Moderator, 51 Posts

Haven't used it but stumbled onto this "Device Aware" SS module on github: [url][/url]. Seems to have a lot of control over images, not sure if SS3 compatible though.


18 January 2013 at 2:40am Community Member, 31 Posts

Thanks a lot, I'll take a look. At first glance it looks a bit clunky for the templates and it's trying to detect the mobile device via the user agent, which is probably not the best way to go about it but it's a nice little module to start hacking with and I think I might be able to take bits from responsive images and merge them into this to get it working how I'd like. Thanks, good find!


18 January 2013 at 3:18am Community Member, 528 Posts

A little off topic, but I've never fully understood the hate for User Agent Detection. The way I see it its propbably accurate in over 95% of the cases. Sure their are a few devices that may send inaccurate user agents (I'm thinking embeded system devices etc) but beyond that its geeks changing their user agent for a reason. IF someone on their adroid devices changes it push a Chrome or Opera desktop user string its because they want a desktop experience. I'm a big fan of user agent detection with feature sniffing in the front end. Device says its an iphone in the user agent, check in for touch in front end and you're golden.


18 January 2013 at 3:23am (Last edited: 18 January 2013 5:49am), Community Member, 31 Posts

Yeah, that's fine if you need that information but all I want to know is what the viewport resolution is. I don't really care what they're browsing on and probably shouldn't unless I'm writing a webapp which uses mobile-specific features.

EDIT: still trying to work out what the code is doing with the mobile detection module. My reply edited for brevity.