Fx. If I have a small image in one element and a bigger one in the next. The max width would be 500px but since the smaller image is only 250px it shouldn't stretch up to 500px but the bigger image is 1000px and should be resized down to 500px.
I've tried. ?mode=max&maxwidth=500px but that resizes the small image up to 500px.
Resize max is a different function requiring two dimension to be set. This will resize the image to the maximum possible value in each direction while maintaining the original aspect ratio.
MaxImage size
Is there anyway to get a max size for an image.
Fx. If I have a small image in one element and a bigger one in the next. The max width would be 500px but since the smaller image is only 250px it shouldn't stretch up to 500px but the bigger image is 1000px and should be resized down to 500px. I've tried. ?mode=max&maxwidth=500px but that resizes the small image up to 500px.
Hi Gísli ,
If you take a quick look at the documentation you will see that you need to turn off upscaling in combination with your image request.
So in your case the request would be:
http://your_image_path.jpg?width=500&upscale=false
Resize max is a different function requiring two dimension to be set. This will resize the image to the maximum possible value in each direction while maintaining the original aspect ratio.
Cheers
James
Thanks James,
I Thought I had read the documentation to the fullest before I posted but I guess I missed that part ;)
cheers.
That understandable. There's a lot to take in and they need some work.
Glad I was able to help :)
is working on a reply...