bolt/bolt — pull request #807 by solarissmoke (2013-12-30 13:26:18+00:00)
Title: Thumbnails should not be be larger than the original image

I just noticed that when a thumbnail is requested with dimensions that are larger than the original image, then timthumb upsizes the original image in order to generate the thumbnail - resulting in a lossy and pixelated image which is worse to look at than the original.

In my view, a thumbnail is by definition a smaller version of the original image - and if the original image is smaller than the size being requested, then Bolt should just serve up the original image rather than upsize it.

Would be happy to provide a patch for this if you agree that this is the right way to go? I can think of two approaches - (1) modify timthumb to prevent upsizing or (2) modify `\Bolt\TwigExtension::thumbnail()` to check whether the size being requested is smaller than the original image, and if not, fall back to `\Bolt\TwigExtension::image()`.