I’m really scratching my head trying to figure out the best method for responsive images with WordPress. Zurb just released a new javascript plugin for their Foundation framework. I’m using Foundation in my custom theme, but I’m just unsure as to how to make featured images work with this? Can anyone help me out with getting it to work with WP?
http://zurb.com/playground/foundation-interchange
Ps. Just want to clarify. Not exactly talking about making an images responsive. I know how to do that, but I’m talking about loading the different size images that WP creates, based on the screen size or device.
If you haven’t already enabled thumbnails in your theme, add this snippit to your functions.php:
Then add this code.
Here’s how it works:
Now the fun part. To use this in your template:
Old question, but I thought I’d share my solution, which makes all images responsive by adding a filter for post_thumbnail_html.