Hi
I need to resize the images in my gallery before sending them to the client browser. The images have sizes of 500 kb (but resized only about 50 kb).
I have in Page.php created a function
function FrontPageRotator() {
return DataObject::get("Image", "`ParentID` = 31");
}
And in Page.ss the following template code
<% if FrontPageRotator %>
<% control FrontPageRotator %>
<img class="frame" src="$Link" style="display:<% if First %>block;<% else %>none;<% end_if %>" width="270" height="220"/>
<% end_control %>
<% end_if %>
I wanted to have $Image.setWidth(140) instead of $Link, but I dont seem to be able to refer to $Image.
Can anyone help?
Thanks in advance.
Best regards Trym