Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Why are the badges so huge?

This question doesn't really matter. But I was doing some random AJAX requests on my treehouse page: teamtreehouse.com/name.json

and I used ajax to respond with the png treehouse badges. Some of these badges are HUGE. For example one was 1250 x 1363.

I just finished a lesson on optimizing webpages, and I wondered if there was a reason for making the badges so large on treehouse (instead of making them as small as possible).

1 Answer

Dane Parchment
MOD
Dane Parchment
Treehouse Moderator 11,077 Points

Well I can't speak for Treehouse since I didn't create their webpage, but basically you need to conscider the scalability of the image itself. If you make the images as small as possible then you can't expand the image to fit larger screens without it getting all pixelated and loosing quality. A large image size can be easily downsized and scaled to fit smaller screens, however, a small image (lets say a 64 x 64 img) can't scale well to fit a design that may want those images to be 100 x 100. So basically they may have large images, but scale them to smaller sizes using css, javascript, svg, or otherwise.

Hopefully that helps answer your question....or maybe I am all wrong and an actual Treehouse developer will let you know :)

thanks for the response.