Closed jamiepittock closed 6 months ago
Should be fixed now. Curious where the error was thrown though, I wasn't able to reproduce when quickly testing it.
@aelvan thanks! That's fixed it.
I realised it only happened when the custom profile being used is a web proxy. Sorry, I should have noticed that and mentioned it.
{% set transformedImage = craft.imagerx.transformImage(
"https://s1.geograph.org.uk/photos/16/80/168021_1f28e99b.jpg",
{ width: '500' },
{},
{ transformerConfig: { profile: 'proxy' } }
) %}
Config...
....
'proxy' => [
'urlEndpoint' => 'https://ik.imagekit.io/afsdf',
'isWebProxy' => true
]
Stack trace if it helps... https://pastebin.com/NsjFXeEm
I'm currently getting a 'Division by zero' error when passing in a custom profile via the
transformerConfig
.I think
$profile
should be passed as the fourth parameter here when you're creating an instance ofImagekitTransformedImageModel
.https://github.com/spacecatninja/craft-imager-x-imagekit-transformer/blob/03bdbb7a1eae6e2496d768e0085c77ff0935af25/src/transformers/Imagekit.php#L77
This fixes it for me: