Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Upsizing Image View modes: 
User avatar
Member
Member
ryan.smyth-t4g - 3/26/2012 3:39:15 PM
   
Upsizing Image
I've enabled permenant links via my site settings and I have had some success at resizing images in the media library. Currently I'm modifying the query string parameters width and height in the permenant getmedia link. However, when my width and/or height query string parameter exceeds the value of the original image the resizing request is ignored.

For example, I upload an image to the media library of width 200 and height 300. I then make a call to getmedia using the guid from the image and adding width=200 and height=350 as query string parameters (getmedia/b180d179-9da7-4330-bf30-3c4e8cea6ff5/TC3Results.jpg.aspx?ext=.jpg&width=200&height=350). The image returned is the original image and not a stretched version of the original (I know this might not look great).

Is there a way to force the new width and height?

User avatar
Kentico Support
Kentico Support
kentico_janh - 3/27/2012 4:20:38 AM
   
RE:Upsizing Image
Hello,

Actually, you can stretch an image by setting those values less then the original size. If you set the width or height of the image greater then its original dimension, the image will be rendered in its original size and regrettably this is hardcoded. So if you want to change this behaviour, you would need to implement your own algorithm for displaying images from media gallery.

Best regards,
Jan Hermann