Thumbnail image enhancements in Sitecore 5.3 best practices!(hockblogs.net)

submitted by hockmanhockman(505) 3 years, 1 month ago

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!

add a comment |category: |Views: 15

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story