Twenty Fourteen: wp_is_mobile() shouldn't be used

Description

[26026] introduced usage of wp_is_mobile() function for determining size of thumbnail that should be displayed (see #25758).

Since wp_is_mobile() checks current visitor, it should be used only on dynamic pages, how it was done in core before (used on admin pages only).

Although frontend is dynamic by default, when page cache is used it isn't. This can for example lead to situation where page view from mobile gets to cache which is then served to all visitors until cache is deleted/expires.

In this case, until browser supports for responsive images becomes standard, solution is to load full-width image or use some Javascript solution.

I think I agree with dimadin here. I discussed wp_is_mobile() usage with iandstewart before it landed, but this didn't occur to me. I wouldn't call this "aggressive" caching, just any kind of caching. Batcache, WP Super Cache, W3 Total Cache, any of them.

In the end, I don't think this is something the theme should be messing with. I totally get that we owe it to the world to serve smaller images to mobile devices, but this just isn't the right way to do it. We need to be dropping a cookie based on bandwidth and/or device. This is not something a theme, certainly not a default one, should be doing.

I'm also not in love with yet another image size, though I can't fault you for it. It would be nice to somehow figure out dynamic sizing at one point.