Jump to:

17488 Posts in 4473 Topics by 1978 members

Archive

SilverStripe Forums » Archive » resizeByWidth Not Working In Template

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

Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 823 Views
  • Liam
    Avatar
    Community Member
    464 Posts

    resizeByWidth Not Working In Template Link to this post

    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.

    823 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.