aelvan / Imager-Craft

This plugin has been DEPRECATED. Check out Imager X instead.
MIT License
342 stars 69 forks source link

The `noop` setting isn't wired in yet, but is documented. #260

Closed meredevelopment closed 5 years ago

meredevelopment commented 5 years ago

Hi, I've just attempted to use the noop config setting and see it's not working because it's not been completed:

if ($config->getSetting('noop', $transform)) {
    // todo : just return source image unmodified
}

For now I've added this to the transform function in the CraftTransformer class as a workaround but would like to see it in the core please.

if (ImagerService::getConfig()->getSetting('noop')) {
    $msg = Craft::t('imager', 'Noop activated, returning “{path}”.', ['path' => $sourceModel->url]);
    Craft::info($msg, __METHOD__);
    $transformedImages[] = $sourceModel;
    return $transformedImages;
}

Thanks!

aelvan commented 5 years ago

This has been fixed for the next release.