+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Images and Documents Query Strings Problem

Images and Documents Query Strings Problem

6 posts, 0 answered
  1. Nadya
    Nadya avatar
    52 posts
    Registered:
    17 Dec 2008
    08 Sep 2009
    Link to this post
    Hi all,
    I am developing a website, using Sitefinity 3.7 and I have to list thumbnails of images in my images galleries.
    For this purpose I am using query strings of the images and documents library.

    The thing that I found is that if I do not give height to the Query string it is not resizing the picture at all.

    For instance if I have : 

    http://www.my_domain.com/MyFile.sflb? proportional =true&width=100&height=100

    it is ok 

    But if I have 

    http://www.my_domain.com/MyFile.sflb? proportional =true&width=100

    it is just not working , and in my case I need just a fixed width - the height should be calculated when I am using "proportional = true", right ?

    Is this a bug or the height is intended to be calculated explicitly ?

    Best,
    Nadya
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Sep 2009
    Link to this post
    Hello Nadya,

    The ImagesHelper class in ContentHttpHandler requires setting width and height for the proportional Query String. Otherwise the request does not reach ResizeImage method.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Coskun SUNALI
    Coskun SUNALI avatar
    7 posts
    Registered:
    16 Aug 2007
    09 Sep 2009
    Link to this post
    Hello Ivan,

    I would like to ask what is the meaning of having a "proportional" parameter in this case when we have to calculate both the width and height by ourselves?

    Thank you in advance.

    All the best,
    Coskun Sunali
    Microsoft MVP - ASP.NET
    http://sunali.com
    http://propeople.dk
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Sep 2009
    Link to this post
    Hello Coskun SUNALI,

    When you use QueryString  proportional the image is stretched only proportionally until it fits in the measures set by the width and height strings.  Example:

    http://domain.com/libraries/MyFile.sflb.ashx?proportional=true&width=200&height=200 

    The proportional is true by default although it is not visible as a QueryString.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Coskun SUNALI
    Coskun SUNALI avatar
    7 posts
    Registered:
    16 Aug 2007
    09 Sep 2009
    Link to this post
    Hello Ivan,

    Alright, that makes sense. However, I would still like to have proportional parameter to work even if we don't set the height or width. As far as I can see, you already have a function calculating the ratio of the dimensions. This would take usefulness of this querystring-based-resize-idea one step further. I can create a "Feature suggestion" ticket in the system or would you like to do it yourself?

    Thank you for the speedy response.

    All the best,
    Coskun Sunali
    Microsoft MVP - ASP.NET
    http://sunali.com
    http://propeople.dk
  6. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    11 Sep 2009
    Link to this post
    Hi Coskun,

    Thank you for the suggestion. We will have this logged. 

    Regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
6 posts, 0 answered