Foundation and Wordpress - Responsive Images

I've been building a lot of my recent WordPress client sites in Foundation, specifically JointsWP because it's just so damn easy to build fast and it works really well straight out of the box. Granted, it doesn't look much like the original 'theme' when I get done with it.

While I was out searching for a solution for implementing responsive images in WordPress, I found... well, nothing, actually. Interchange is a cool feature, but it was a bit tricky to get implemented to show the WordPress featured images. So I made it. Here you go:

https://gist.github.com/joshrainwater/69b94e5169f7252bc1cd

NOTE: This specific use case has different form factors for a grid-based thumbnail layout, and the featured image sizes for the top of posts. Hence the two different entry points to the same function.

{{ message }}

{{ 'Comments are closed.' | trans }}