Jump to:

7939 Posts in 1472 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Image Gallery Thumbnails Cropping vs Resize

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1913 Views
  • hellohector
    Avatar
    9 Posts

    Image Gallery Thumbnails Cropping vs Resize Link to this post

    Hello,

    Forgive me if this has been discussed already as I could not find it.

    I would like to know how to stop the image gallery thumbnails from being cropped. Instead, If I set a width of 150px, I would like to maintain aspect ratio and have the thumbnails created to that width, and whatever height is necessary.

    Thanks

    Hector.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Image Gallery Thumbnails Cropping vs Resize Link to this post

    I plan to add that in soon. I've had a lot of requests for it.

  • hellohector
    Avatar
    9 Posts

    Re: Image Gallery Thumbnails Cropping vs Resize Link to this post

    Thank you uncle cheese.

    I've brought in thumbnails before manually, so that a page has it's own thumbnail.
    In the .php file it looks something like this $fields->addFieldToTab("Root.Content.Images", new ImageField('Photo'));
    And in the .ss file, something like this $Photo.SetWidth(150)

    I'm just not sure how to edit your magnificent code without breaking it.

  • GRiiDWeb
    Avatar
    Community Member
    60 Posts

    Re: Image Gallery Thumbnails Cropping vs Resize Link to this post

    Hi,
    Sorry to be a pain with all the requests, but I have had a request for this in the last week from a fairly major client (along with the video stuff).
    Is there a way you could point me in the right direction for coding this. I've tried doing with CSS, but it's not really working.

    Thanks again
    GW

    1913 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.