I am trying to extend Image so when I return it to the template it has a certain compression ratio (don't ask):
CustomImage.php
class CustomImage extends Image
{
function generateOptimised($gd) {
$gd->setQuality(70);
return $gd->resizeByWidth(941);
}
}
And in my template:
<% control CustomImage %>
$Optimised
<% end_control %>
OR:
$CustomImage.Optimised
Doesn't do anything.
$CustomImage.Optimised.URL
returns 'http://' what am I doing wrong? have used custom images before