3212 Posts in 847 Topics by 809 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2137 Views |
-
How to resize only big images ?

21 December 2008 at 1:37am
Hi,
In my template, I show an image on the top of the page. The images have differents sizes. I want to resize image only if the image is bigger than 450px width or 250px height. For the moment, I'm using :
<% $Photo.SetWidth(450) %>
where Photo is an ImageFieldThe problem with this is that if the image is smaller it resize it bigger (poor quality) and if the image is vertical the resize's image is too big.
an issue ?
Thank's. Julien C.
-
Re: How to resize only big images ?

22 December 2008 at 2:10am
Ok,
but I don't know where to use it. I have to change Image.php (model) ?
Julien.
-
Re: How to resize only big images ?

22 December 2008 at 3:03am
I have found an example : http://doc.silverstripe.com/doku.php?id=recipes:customising_image
Thank's. Julien
| 2137 Views | ||
|
Page:
1
|
Go to Top |


