With Craft's image transforms used to resize images or generate thumbnails, can you prevent images from being upscaled? There's often cases where it makes no sense to increase the dimensions of an image.
It would be great if there was a setting for this, but I can't find one documented.
Otherwise, is the solution to fetch the image size in Twig and then conditionally apply the image transform?