Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

resizeByWidth Not Working In Template


Go to End


1339 Views

Avatar
Liam

Community Member, 470 Posts

7 November 2008 at 7:58pm

I can use any of the GD functions except ResizedImage(). Am I misunderstanding how they work. Below is the code:'

<% control Photo1 %>
<% control resizeByWidth(125) %>
<img src="$URL" class="portrait" alt="" title="" />
<% end_control %>
<% end_control %>

The reason I use it in a control, is so I can attach a class to the image tag.