Sitemap
Simon Goetz

Simon Goetz

Partner at Milkshake Studio @milkshake_bk — Maker of things — Mountain man at heart

How We Solved Responsive Image Sizing

Not all screens are made the same.

3 min readApr 30, 2014

When redesigning Architizer from the ground up we focused on designing a fully responsive site that would give users the same experience on all devices. This raised some tricky issues when it came to image aspect ratios. Architects were uploading both portrait and landscape images, not to mention extreme aspect ratios.

The images themselves all had unique compositions that required seeing a specific portion of the picture to really understand the space. Cropping images would be messy and very time consuming, it would also mean that all of our images would be constrained to specific proportions when the page gets resized.

This was a big issue. We had introduced full width images at the top of almost all of our pages, allowing the users to highlight a cover photo. As you can see in this article, Medium has implemented a similar feature. The issue with what Medium has done is that as the author, I can not select what portion of my image is showing. If my image were vertical and I wanted you to see the bottom, I would have to crop the image before hand. Although this doesn't seem like a large request for one image, it quickly escalates when you are uploading 20 images. Not to mention, architects are not willing to create custom media for each place they present their work.

Our solution came via the creative minds at Typecode

We decided to treat all images as background images, by setting the background-size to cover the image would always fill the parent element. (This is the same way that medium has done it, although we chose to do this for all images on our site.) This combined with responsive vertical margins created a vastly responsive site. This however, this only solved half of the problem. Now we had to figure out how to keep a specific portion of the image centered.

Get Simon Goetz’s stories in your inbox

Join Medium for free to get updates from this writer.

By hijacking the right click function on the image, we allow our users to pick the focus point of the image. This simply sets the background image’s position for that individual picture, giving the user full control over how each of their images are seen.

The final implementation has works seamlessly. As you can see below on the cover image, the curser shows a crosshair with an action to set the focus point. In one click the image’s center moves and the action is saved. This can be done on any image across the site, whether is a cover photo or a thumbnail, each image will be correctly cropped.

Screenshot taking on Danielsen Architecture’s Project Page

The main issue we had seen with this solution was easily fixed. We noticed that Pinterest was having problems grabbing our images from the page. Since they parse <img> tags, we created a script to pass them the images on the page. A simple fix, and well worth the flexibility we now have with images sizes.

From the stand point of an Architizer editorial staff members, this solution has saved an immense amount of time. Our team no longer has to save images to their computer, crop them, and re-upload them for use in an article. We can grab the image’s tag, place it in the article and click to focus on a specific point.

It really has changed the flow for our team. As for our users, they seem to be fairly happy as well. Although they are not all technically savvy, the vast majority understand how to use the feature off the bat. The small amount of times we have had to explain the feature to a user, they were blown away by how easy it was.

--

--

Simon Goetz
Simon Goetz

Written by Simon Goetz

Partner at Milkshake Studio @milkshake_bk — Maker of things — Mountain man at heart