jarednova/timber — pull request #95 by mgmartel (2013-10-27 19:29:42+00:00)
Title: Add image size param to TimberImage::get_src

Hi again! I am using [this](http://wordpress.org/plugins/manual-image-crop/) plugin to manually adjust the crop on WP image sizes, but `TimberImage::get_src` only retrieves the full size image. Using the resize filter works nicely in most other situations, but not this one. (Nb. all image sizes are loaded into `TimberImage::$sizes`, but these are unfiltered.. plugins like Manual Image Crop filter into image_downsize)

I propose to add an image size param to `TimberImage::get_src`, so one can optionally retrieve a specific image size.

As an added bonus, you can then combine the WP size with the resize filter, for extra fine grained control over cropping! I now use my WP image size as a large cropping ratio for a manual crop, and then use the resize filter to downsize the image where necessary. Example:
```php
add_image_size( 'squared', 1000, 1000, true );
```

```
{# view.twig #}

```