Loading
 

FREE OFFER

LiveBuild
We’ll build your
website for you

YWD logo

YWD logo

 

June 2012


Auto-resizing images to fit your page layout

Jun 18, 2012 3:30 PM
by Flavio Mester

In Your Web Department clients upload and insert images on their own, and sometimes they may not fit within the page layout. Also as more people are creating a mobile-optimized version of their website we wanted to make their lives easier by taking care of any sizing issues for them.

Limiting the size of images while uploading

YWD BlogPeople often don’t realize their photos can be too big for their website. Even if they manually resize them in our Word Processor, they cause the page to be slow. Also, Windows browsers do a bad job of resizing images on the fly.

So when images are being uploaded to YWD's Assets Manager they're automatically resized to a maximum of 1200 pixels (either width or height) while keeping the same proportions, and only then added.

However, sometimes you may need to upload a larger image – e.g. a big textured background. You can change the 1200px default in YWD Designer / Layout / Page / Images, special – Auto-resize images when uploading.

Shrinking content images so they fit

Limiting the size will still let people insert an image that’s kosher to upload, yet too wide to fit within the page layout. For instance, you could upload a 900px wide photo and then insert it on a page whose main column is just 700 pixels wide. Or  it may fit on computers, but not on mobile, with its 320px viewport.

So YWD provides an additional setting in YWD Designer / Page / Images, special - Shrink content images so they fit?:

  • Mobile devices only
    The default and adequate in most cases. If an image is too wide for the mobile's viewport it shrinks to fit, while keeping the aspect ratio.
  • Yes for all devices
    Same as above but it'll shrink on computers and tablets as well.
  • No shrinking on computers; limit the width on mobile devices
    Computers and tablets are not affected; on mobile the width shrinks but the height remains the same (may cause distortions).

Keep in mind that if you choose either one of the first two options, manually resizing an image in the Word Processor will have no effect.

That's because YWD uses CSS (if you're familiar with it we're setting both the width and height to 100% of the image's container) which will override any manual resizing done in the Word Processor.

A mobile example

Check out this blog post on both your computer and mobile and you’ll see the latter images on the fly so they fit the viewport. We use responsive design techniques to apply the “shrinking approach” only to the specified device.

In addition, YWD makes avatar pictures smaller on mobile. You can choose to display avatar images or not (YWD uses Gravatar, the most popular and free avatar service) in blog post headers in YWD Designer / Tools / Blog Headers.


Don't have a Your Web Department website? Get yours at www.yourwebdepartment.com



Flavio Mester

Flavio Mester is a graphic designer as well as a systems analyst (in a distant life he was an architect). A founding partner of Your Web Department, he's responsible for the design and development of all the YWD website management platform interfaces.
Flavio Mester on Google+ | Twitter | LinkedIn

YWD News, HowTo, Mobile  
  


 

Top of page

Don't miss our posts!

Get them weekly in your inbox

First Name: *
Last Name: *
Email: *
Invisifield:
Invisifield:
 

Your Web Department Blog RSS feed
Suscribe to our
RSS feed

YWD Clients

YWD Pricing

Get started!

Make your own website
Get started now!

Don't pay until you go live.

Cloud Nine Creative

Scott Thompson Talk

YWD Synergy™

Take advantage of exciting deals made available exclusively to YWD clients

YWD™ Incentive Program Don't just make money on every job, now you can make money every monthYWD™ Referral Program
Don't just make money on every job, now you can make money every month
YWD™ Search Engine OptimizationYWD™ Search Engine Optimization
Fine tune your site to improve its chances of being better ranked on Google
VIDEOitVIDEOit: describe your company, product, promotion or service using video Get 10% off your first video just for being a Your Web Department™ customer