New! Adaptive sizing
Now you can have your images automatically scaled for every type of mobile phone on earth.
We’re very exciting to announce that we’ve partnered with the DeviceAtlas team over at dotMobi to bring you a great new capability for tinySrc.
We call it ‘adaptive sizing’.
There are thousands of different types of mobile handsets, and they all have different screen sizes. With tinySrc’s adaptive sizing, that’s now just one thing less to worry about when you’re developing a mobile web site. Take a look:
<img
src='http://i.tinysrc.mobi/http://mysite.com/myimage.png'
alt='My image, perfectly sized to the device screen'
/>
By default, tinySrc will now use the screen width and height values of the visiting phone to constrain your images. So you can be sure there won’t be any unpleasant scrollbars where there shouldn’t be.
You can also indicate that you want your images to take up specific portions of a mobile screen. Use the tinySrc API to deduct pixels from the screen size (perhaps to leave a deliberate border), or scale images to a given percentage of the screen (perhaps to create a well-aligned tiling effect).
<img
src='http://i.tinysrc.mobi/x50/x50/http://mysite.com/myimage.png'
alt='My image, in a quadrant of the screen'
/>
Pretty easy, huh?
All the details of the adaptive sizing feature are in a new section of the documentation, and we’d love to hear your feedback.