Error!
Success!

Thumbnail image enhancements in Sitecore 5.3 best practices!

0
kicks

Thumbnail image enhancements in Sitecore 5.3 best practices!  (Unpublished)

Hi there, On http://sdn5.sitecore.net/Articles/XSL/5%203%20Enhancements/Image%20Enhancements.aspx you can find a list of image enhancements attributes that you can apply to an image. Recently I was looking for some thumbnail enhancements and found that in this list. When testing some things out, I noticed something that I want to share: Lets take this picture: It's a picture of a basket and has 200pxX200px dimensions. The original size is 7767 bytes. Let's now add the Image Enhancements attribute 'thn' to the media URl /~/media/E3AA64326D724CF6A3B3573922086F18.ashx?thn=1, we endup with a 150px X 150 px thumbnail. The size in bytes is however a shocking 42770 bytes (That's almost 6 times as big as the original image!!! Cry) After seeing that, I replaced the 'thn' querystring with a combination of maxwidth, maxheight and autoscale: ~/media/E3AA64326D724CF6A3B3573922086F18.ashx?mw=150&mh=150&as=1 . With this we also end up with a 150px X 150 px thumbnail. But this time the size in bytes is just a lousy 4633 bytes, that's nearly 60% of the original image! At least I know now, that you'd better not use the 'thn' image enhancements. Maybe Sitecore should have a sort of Best Practices list, where this 'best practice' should be added to!


Kicked By:
Drop Kicked By: