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

HTML

Luke Lee
Luke Lee
7,577 Points

Do we really use picturefill to make responsive design?

Each image needs 4-6 different size images for backup, and the code is 5 lines long. Do we really use this tectonic when we build responsive design?

Have a look at using .SVG's see here

Kevin Korte
Kevin Korte
28,148 Points

SVG's do not work well for images.

1 Answer

The picturefill plugin is quite solid, but as you already mentioned, with the downside of the amount of maintenance effort markup as well as file wise. basically the extra markup is a few tenth of kb, but in contrast you save with the specific loaded viewport version of the images a few 100 kb or even megabyte of data to load, which makes a huge difference especially on mobile. therefor it is still reasonable to go with it. or you might take a look at a plugin i've done with a friend of mine, dealing at least with the first of the two problem - the bloated markup on the html side ( https://github.com/geibi/pictureserve ).

@kevin i guess adam might referred to svg thinking of the clown car technique. but anyway i would also prefer to use svg only for vector files, logos and stuff or for the creation of icon fonts.

best regards ralf