I'm trying to use the https://github.com/aelvan/Imager-Craft plugin to make specific image transformations, but cannot figure out how to access Imager within the element-api.php file.
Imager shows plenty of template examples, but I'm not sure how to translate template code like this into straight Element API php.
{% set image = craft.assets().one() %}
{% set transformedImage = craft.imager.transformImage(image, { width: 1000 }) %}
<img src="{{ transformedImage.url }}">
Specifically, I'm trying to access that craft.imager.transformImage function. Is this possible?
I'm trying to use the https://github.com/aelvan/Imager-Craft plugin to make specific image transformations, but cannot figure out how to access Imager within the
element-api.php
file.Imager shows plenty of template examples, but I'm not sure how to translate template code like this into straight Element API php.
Specifically, I'm trying to access that
craft.imager.transformImage
function. Is this possible?