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
Tracy Excell
Front End Web Development Techdegree Graduate 15,333 PointsImage srcset how can I get this to work correctly?
Hello,
I am trying to get my images to change from portrait for mobile and tablet devices to landscape images for desktop devices, but my srcset code is not working? Can anyone see what I am doing wrong here?
<script src="js/picturefill.min.js" async></script>
``` <img
srcset="../Images/islal11.JPG 2000w,
../Images/islap11.JPG 700w,
../Images/islap11.JPG 300w"
src=" ../Images/islap11.JPG"
alt="girl wearing headphones image"
class="image"
/>
2 Answers
Owa Aquino
19,277 PointsHi Tracy!
Check your image path if it's correct. I can see that you have extra space on your "src" attribute.
src="../Images/islap11.JPG"
Come back to me if this works.
Cheers!
- Owa
Tracy Excell
Front End Web Development Techdegree Graduate 15,333 PointsHi it's a personal project on my computer will just have to keep working on it. Thank you for looking does the code look correct to you? Will try it out side of my project to try and make sure I am coding it correctly ?
Tracy Excell
Front End Web Development Techdegree Graduate 15,333 PointsTracy Excell
Front End Web Development Techdegree Graduate 15,333 PointsThank you for picking up the mistake, it still didn't work so I tried:
<picture>
and no luck there either, am I coding this wrong, using the wrong tool??
Owa Aquino
19,277 PointsOwa Aquino
19,277 PointsCan you share a snapshot of your current workspace?