Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Design

Best practices for graphics-heavy webpages?

I'm creating a website with several photo galleries. I've compressed the photos as much as I can without losing quality, but most are still around 200-300kb. With a couple dozen of these photos on one page, loading times can be pretty sluggish.

What are the best design practices for image-intensive pages? Should I focus purely on file sizes or are there some design/development tricks I can use? Right now, I'm using slightly smaller thumbnails which link to the actual image through Lightbox. I should also mention this is for a photography portfolio, so I'd like the viewer to see all the images up front rather than one at a time via a carousel.

1 Answer

John Wheal
John Wheal
27,969 Points

I'm not sure if you've already seen it but Treehouse has a Technology Foundation course which covers the best practices for saving images for the web - http://teamtreehouse.com/library/technology-foundations

As you have said, loading a smaller thumbnail image and the larger image later is one option. If this is photographs I'd expect jpeg to offer the best compression.

Another option to consider is to host the images elsewhere (e.g. AWS S3) or even use a Content Delivery Network but this might be overkill for a small photographer.