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

Forums / Sitefinity SDK / Sitefinity 4.0 Dynamic Image Resize URL

Sitefinity 4.0 Dynamic Image Resize URL

11 posts, 1 answered
  1. Haydn
    Haydn avatar
    13 posts
    Registered:
    13 May 2008
    09 Dec 2010
    Link to this post
    Hi guys,

    I have a quick question related to dynamic "on the fly" image resizing by accessing a image asset by URL with query strings for the width and height.

    In Sitefinity 3.x, it was possible to do this by adding the following to the asset's URL.

    http://domain.com/libraries/library_name/image_name.sflb?width=640&height=480&proportional=true

    However, in Sitefinity 4.0, these query string parameters seem to have no effect on the image.

    http://domain.com/images/tiles/2010/12/01/image.jpg?width=640&height=480

    Is this still supported in Sitefinity 4.0? Or is there another URL scheme to handle this.

    Note: Our designers loved the 3.x approach, as it meant they could represent multiple sizes with a single image asset. :D

    Kind Regards

    Haydn

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    10 Dec 2010
    Link to this post
    Hello Haydn,

    Please take a look at this article Images and Documents Overview

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
    Answered
  3. Allen
    Allen avatar
    71 posts
    Registered:
    04 Aug 2007
    19 Jul 2011
    Link to this post
    The URL has changed since this thread began making for a very misleading assumption that it is not possible to do.  The new URL with the detail is here:
    http://www.sitefinity.com/40/help/developers-guide/sitefinity-essentials-modules-media-modules.html

  4. Travis
    Travis avatar
    86 posts
    Registered:
    15 Oct 2008
    18 Apr 2012
    Link to this post
    I could not find any information on the link posted by Allen (and the link from Ivan has expired). So is this functionality built into sitefinity still? Judging by Allen's comment, I'd assume it was, but, I couldn't find any documentation about resizing via query string in the Media Modules overview. If it is still supported, what article within the developers guide in particular relates to it?
  5. Travis
    Travis avatar
    86 posts
    Registered:
    15 Oct 2008
    18 Apr 2012
    Link to this post
    ARG DOUBLE POST... The sitefinity forums often tell me there was an error posting even if there wasn't... that's the cause for the double post anyway...
  6. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    24 Apr 2012
    Link to this post
    Sitefinity now has a size parameter you can use to resize an image, like

    /images/default-album/myimage.png?size=800

    however it is not yet a recommended feature as it is not fully matured. currently it will resize on demand for every request (no caching) meaning you'll take a performance hit on every load. There are plans to improve this story, but I'm not sure when they are scheduled to be implemented.

    However, if you're trying to show a thumbnail a better suggestion would be to add the .tmb extension to the image src

    /images/default-album/myimage.png.tmb as this uses the actual thumbnail that was generated when you initially uploaded the image.

    I hope this is helpful!
  7. Allen
    Allen avatar
    71 posts
    Registered:
    04 Aug 2007
    25 Apr 2012
    Link to this post
    Has the .tmb format gotten better?  I have had trouble in the past where the thumbnail (even from a modestly-sized image) was pretty poor quality.  However, I have also seen the same result with adding the size attribute.  Is there a certain dpi that is optimal for the best scaling?  Most of my images are at 96dpi and I don't know if it handles 72dpi better or not.  Either way, for now, I usually create multiple images optimized to the size.  It isn't the optimal way code-wise, but it is the only way I have been able to guarantee consistent quality.
  8. Lev Rosenblit
    Lev Rosenblit avatar
    37 posts
    Registered:
    14 May 2008
    29 Apr 2012
    Link to this post
    Hi,
    I use the 'size' parameter with 4.x and 5.0 versions.
    Recently i've upgraded from 5.0 to 5.0 SP1 and now suddenly the size parameter has no effect.

    did the upgrade process delete the handler? or is this feature not supported any more?

    Thanks.
    Lev.
  9. Lev Rosenblit
    Lev Rosenblit avatar
    37 posts
    Registered:
    14 May 2008
    29 Apr 2012
    Link to this post
    Hi,
    I use the 'size' parameter with 4.x and 5.0 versions.
    Recently i've upgraded from 5.0 to 5.0 SP1 and now suddenly the size parameter has no effect.

    did the upgrade process delete the handler? or is this feature not supported any more?

    Thanks.
    Lev.
  10. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    01 May 2012
    Link to this post
    Lev,

    it appears this feature is now "opt in" due to the current performance limitations. I'm sure this will be changed once the feature matures.

    In the meantime you can restore the functionality by taking a look at this KB article: Resizing images through the URL does not work after upgrade to 5.0 SP1

    hope this is helpful, thanks for reporting this issue!
  11. UI Crew
    UI Crew avatar
    99 posts
    Registered:
    24 Sep 2012
    01 May 2012
    Link to this post
    Sitefinity need to look into implementing something like Nathanael's Imageresizer into the product as manipulating images on the fly for different UI is a frequent thing to do in in a CMS:
    http://imageresizing.net/
11 posts, 1 answered