{"id":1391,"date":"2012-03-11T23:12:06","date_gmt":"2012-03-11T23:12:06","guid":{"rendered":"http:\/\/gr-01.de\/whitepapers.grafik-und-redaktion.de\/?p=1391"},"modified":"2013-06-03T03:43:28","modified_gmt":"2013-06-03T01:43:28","slug":"the-challenge-of-responsive-images","status":"publish","type":"post","link":"https:\/\/whitepapers.grafik-und-redaktion.de\/?p=1391","title":{"rendered":"The Challenge of Responsive Images"},"content":{"rendered":"<p><a href=\"http:\/\/speckyboy.com\/2012\/03\/05\/the-challenge-of-responsive-images\/?utm_source=feedburner&amp;utm_medium=email&amp;utm_campaign=Feed%3A+speckboy-design-magazine+%28Speckyboy+Design+Magazine%29\">speckyboy<\/a><\/p>\n<p>Images are one of the most important elements on a web page in terms of user experience. Few objects on a page have the same impact on everything from emotional responses to bounce rates.<\/p>\n<p>When users are viewing your site on mobile devices, small screens, or in other unusual situations the images can distort the page and ruin your careful site design. That\u2019s why responsive design is being developed. In this post we examine the use of images in responsive design<!--more--><\/p>\n<p>The Challenge Of Images In Responsive (&amp; Mobile) Design<\/p>\n<p>Responsive design has the web industry talking. Rightly so \u2013 it\u2019s the most important development in web design for years. For the first time, devices of all shapes and sizes will have the opportunity to experience a beautiful and feature rich Internet. For those not in the loop, responsive design builds sites to adapt to the display area (browser window) available to them. Whilst this is a great opportunity to make the Internet better, that\u2019s not to say the advantages are without challenges. One of the most interesting being the handling of images. Let\u2019s examine some basic techniques along with the problems they pose.<br \/>\nA Simple Fit<\/p>\n<p>Seting the images so their width can never be greater than their container element is one of the easier ways to allow images to adjust to the page size automatically. As the column they are contained in shrinks, for example, the would simply scale down to match. You can even include videos and other objects the same way.<\/p>\n<p><a href=\"http:\/\/gr-01.de\/whitepapers.grafik-und-redaktion.de\/the-challenge-of-responsive-images.html\/responsive_images\" rel=\"attachment wp-att-1392\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1392\" title=\"responsive_images\" src=\"http:\/\/gr-01.de\/whitepapers.grafik-und-redaktion.de\/uploads\/2012\/03\/responsive_images.jpg\" alt=\"\" width=\"640\" height=\"366\" srcset=\"https:\/\/whitepapers.grafik-und-redaktion.de\/wp-content\/uploads\/2012\/03\/responsive_images.jpg 640w, https:\/\/whitepapers.grafik-und-redaktion.de\/wp-content\/uploads\/2012\/03\/responsive_images-620x354.jpg 620w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Imagine the layout on the left <strong>(1)<\/strong> with one large image clearly dominating the other two. As we shrink our display area, designers have chosen to move to a one column layout <strong>(2)<\/strong> and ensure the images are set to never go beyond 100% of the column width resulting in the layout on the right.<\/p>\n<p>You can see that the lower images have doubled in relative size on the mobile screen, but our main image has become an extremely thin letterbox atop the two now dominant images. This clearly isn\u2019t the intention of the design.<\/p>\n<p><a href=\"http:\/\/daverupert.com\/2011\/11\/responsive-image-hierarchy\/\">Dave Rupert<\/a> has a really nice solution to this phenomenon:<\/p>\n<div>\n<div id=\"highlighter_991176\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<div>4<\/div>\n<div>5<\/div>\n<div>6<\/div>\n<div>7<\/div>\n<\/td>\n<td>\n<div>\n<div><code>.banner-item {<\/code><\/div>\n<div><code>\u00a0<\/code><code>overflow<\/code><code>: <\/code><code>hidden<\/code><code>;<\/code><\/div>\n<div><code>\u00a0<\/code><code>min-height<\/code><code>: <\/code><code>300px<\/code><code>; <\/code><code>\/* 300px is arbitrary. *\/<\/code><\/div>\n<div><code>}<\/code><\/div>\n<div><code>.banner-item img {<\/code><\/div>\n<div><code>\u00a0<\/code><code>width<\/code><code>: <\/code><code>100%<\/code><code>;<\/code><\/div>\n<div><code>}<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>By fixing the height of the header image and allowing it to overflow we ensure the image ranking is maintained. As we see in the simple picture for narrow screens, image height determines this instead of width.<\/p>\n<h4>Think Responsive And Look Forward To Developments To Come<\/h4>\n<p>The most important thing about responsive design is that we keep thinking and looking forward to a time when users on all devices can enjoy a beautiful web. As problems such as those examined here present themselves, web technologies and development tools will advance to fill those gaps. In the mean time we\u2019ll cover some useful issues and provide some interesting additional reading for advanced users looking to tackle these issues in their designs.<\/p>\n<h4>Other Solutions<\/h4>\n<p><a href=\"http:\/\/adaptive-images.com\/\">Adaptive Images<\/a><br \/>\nA Javascript solution for your website\u2019s content images. No need to change your mark-up, it manages its own image re-sizing, and will work on any CMS or even on static HTML pages.<\/p>\n<p><a href=\"http:\/\/nicolasgallagher.com\/responsive-images-using-css3\/\">Responsive Images Using CSS3<\/a><br \/>\nThis method relies on the use of @media queries, CSS3 generated content, and the CSS3 extension to the attr() function.<\/p>\n<p><a href=\"http:\/\/css-tricks.com\/resizeable-images-at-full-resolution\/\">Resizable Images at Full Resolution<\/a><br \/>\nThe trick to this solution is to make sure your starting image is larger than the default size.<\/p>\n<p><a href=\"http:\/\/filamentgroup.com\/lab\/responsive_images_experimenting_with_context_aware_image_sizing\/\">Responsive Images: Experimenting with Context-Aware Image Sizing<\/a><br \/>\nThis approach will allow developers to start with mobile-optimized images in their HTML and specify a larger size to be used for users with larger screen resolutions<\/p>\n<p><a href=\"http:\/\/unstoppablerobotninja.com\/entry\/fluid-images\/\">Fluid Images<\/a><br \/>\nBy Ethan Marcotte on Unstoppable Robot Ninja.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>speckyboy Images are one of the most important elements on a web page in terms of user experience. Few objects on a page have the same impact on everything from emotional responses to bounce rates. When users are viewing your &hellip; <a href=\"https:\/\/whitepapers.grafik-und-redaktion.de\/?p=1391\">Weiterlesen &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[95,83],"_links":{"self":[{"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/posts\/1391"}],"collection":[{"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1391"}],"version-history":[{"count":4,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/posts\/1391\/revisions"}],"predecessor-version":[{"id":1395,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=\/wp\/v2\/posts\/1391\/revisions\/1395"}],"wp:attachment":[{"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/whitepapers.grafik-und-redaktion.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}